#include <iostream>
#include <cmath>
using namespace std;
int main() {
double E, a = 2, sum = 2;
cin >> E;
for(int i=1; abs(a*=2.0/(i+1))>=E;i++){
sum+=a;
}
cout << sum;
return 0;
}
ICNpbmNsdWRlIDxpb3N0cmVhbT4KICAgICNpbmNsdWRlIDxjbWF0aD4KICAgIHVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAgICAgCiAgICBpbnQgbWFpbigpIHsKICAgIAlkb3VibGUgRSwgYSA9IDIsIHN1bSA9IDI7CiAgICAJY2luID4+IEU7CiAgICAJZm9yKGludCBpPTE7IGFicyhhKj0yLjAvKGkrMSkpPj1FO2krKyl7CiAgICAJCXN1bSs9YTsKICAgIAl9CiAgICAJY291dCA8PCBzdW07CiAgICAJcmV0dXJuIDA7CiAgICB9