#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 2e5 + 9;
const int mod = 1e9 + 7;
const double eps = 1e-9;
#define inf 2e18
ll ans;
double d=sqrt(2);
bool check(double x)
{
ll res=0,now=0;
ll st = x/d;
res += st * st;
if(res * 4 >= ans) return false;
ll nx = st + 1, ny = st;
//find_now
while(nx <= x)
{
ll l = 0, r = sqrt(x * x - nx * nx) + 10;
while (l < r)
{
//cout<<l<<' '<<r<<'\n';
ll mid = (l + r)/2 + 1;
if (nx * nx + mid * mid <= x * x) l = mid;
else r = mid - 1;
}
now += l;
nx++;
}
now *= 2;
res += now;
res *= 4;
if(res > ans) return false;
return true;
}
void solve()
{
cin>>ans;
ans ++;
double l=1, r=1e9 + 100, mid;
while(fabs(l-r)>=eps)
{
mid = (l+r)/2;
if(check(mid)) l = mid;
else r = mid;
}
printf("%.10lf",mid);
}