#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double Xn = 1, Sn = 0, epsilon; unsigned int n = 0;
cin >> epsilon;
while (Xn >= epsilon)
{
n++;
Xn *= 2.0 / (n+1);
Sn += Xn;
}
cout << fixed << setprecision(15) << n << " " << Sn << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgZG91YmxlIFhuID0gMSwgU24gPSAwLCBlcHNpbG9uOyB1bnNpZ25lZCBpbnQgbiA9IDA7CiAgICBjaW4gPj4gZXBzaWxvbjsKICAgIHdoaWxlIChYbiA+PSBlcHNpbG9uKQogICAgewogICAgICAgIG4rKzsKICAgICAgICBYbiAqPSAyLjAgLyAobisxKTsKICAgICAgICBTbiArPSBYbjsKICAgIH0KICAgIGNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDE1KSA8PCBuIDw8ICIgIiA8PCBTbiA8PCBlbmRsOwogICAgcmV0dXJuIDA7Cn0=