#include <iostream>
#include <cmath>
using namespace std;
signed main() {
double one = 1.0;
double a;
cin >> a;
int l = 2, r = 10000;
while(l <= r){
int m = (l+r)/2;
if(one + one/m < a) r = m - 1;
else l = m + 1;
}
cout << one + one/l;
#include <iostream>
#include <cmath>
using namespace std;
signed main() {
double one = 1.0;
double a;
cin >> a;
int l = 2, r = 10000;
while(l <= r){
int m = (l+r)/2;
if(one + one/m < a) r = m - 1;
else l = m + 1;
}
cout << one + one/l;
}