#include <bits/stdc++.h>
#define ll long long int
#define N "\n"
using namespace std;
ll count(ll x , ll radius){
ll left=0,right=radius,ans=0;
while(left<=right){
ll mid=(left+right)/2;
if(mid*mid<=radius*radius - x*x){
ans=mid;
left=mid+1;
}
else{
right=mid-1;
}
}
return ans;
}
bool bs(ll mid, ll k){
ll cnt=0;
for(ll i=-mid;i<=mid;i++){
ll mxY=count(i,mid);
cnt+=(2*mxY)+1;
}
return cnt>=k;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll k;
cin >> k;
ll lo=1,hi=1e5;
while(lo<=hi){
ll mid=(lo+hi)/2;
if(bs(mid,k)){
hi=mid-1;
}
else{
lo=mid+1;
}
}
cout << lo << N;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nIGludAojZGVmaW5lIE4gIlxuIgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpsbCBjb3VudChsbCB4ICwgbGwgcmFkaXVzKXsKICAgICAgICBsbCBsZWZ0PTAscmlnaHQ9cmFkaXVzLGFucz0wOwogICAgICAgIHdoaWxlKGxlZnQ8PXJpZ2h0KXsKICAgICAgICAgICAgICAgIGxsIG1pZD0obGVmdCtyaWdodCkvMjsKICAgICAgICAgICAgICAgIGlmKG1pZCptaWQ8PXJhZGl1cypyYWRpdXMgLSB4KngpewogICAgICAgICAgICAgICAgICAgICAgICBhbnM9bWlkOwogICAgICAgICAgICAgICAgICAgICAgICBsZWZ0PW1pZCsxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ9bWlkLTE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBhbnM7Cn0KYm9vbCBicyhsbCBtaWQsIGxsIGspewogICAgICAgIGxsIGNudD0wOwoKICAgICAgICBmb3IobGwgaT0tbWlkO2k8PW1pZDtpKyspewogICAgICAgICAgICAgICAgbGwgbXhZPWNvdW50KGksbWlkKTsKICAgICAgICAgICAgICAgIGNudCs9KDIqbXhZKSsxOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY250Pj1rOwp9CmludCBtYWluKCkKewogICAgICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgICAgIGNpbi50aWUoTlVMTCk7CiAgICAgICAgbGwgazsKICAgICAgICBjaW4gPj4gazsKCiAgICAgICAgbGwgbG89MSxoaT0xZTU7CiAgICAgICAgd2hpbGUobG88PWhpKXsKICAgICAgICAgICAgICAgIGxsIG1pZD0obG8raGkpLzI7CiAgICAgICAgICAgICAgICBpZihicyhtaWQsaykpewogICAgICAgICAgICAgICAgICAgICAgICBoaT1taWQtMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgIGxvPW1pZCsxOwogICAgICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjb3V0IDw8IGxvIDw8IE47CiAgICAgICAgcmV0dXJuIDA7Cn0=