//
// @handle: imransihab0
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define py cout << "WIN" << endl
#define pn cout << "LOSE" << endl
#define fl(a, b) for (int i = a; i < b; i++)
#define flj(a, b) for (int j = a; j< b; j++)
#define fll(a) for (auto &i : a)
#define ssort(a) sort(a.begin(), a.end())
#define ssortf(a, x) sort(a.begin(), a.end(), x)
#define rvs(a) reverse(a.begin(), a.end())
#define all(a) (a).begin(), (a).end()
#define el cout << "\n"
#define endl "\n"
#define sz(a) a.size()
#define FastIO() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
double distance(int x, int y) {
return (x*x*1.0)+(y*y*1.0);
}
int count(int k) {
int cnt = 0;
for(int i=1; i<=k; i++) {
for(int j=1; j<=k; j++) {
if(distance(i, j) <= k*k) cnt++;
}
}
cnt *= 4;
cnt += (4*k);
return cnt+1;
}
void solve()
{
int n; cin >> n;
// cout << (int)distance(5, 0) << endl;
int l = 1, r = 1e4, mid, ans = -1;
while(l<=r) {
mid = (l+r)>>1;
int ff = count(mid);
if(ff >= n) {
ans = mid;
r = mid-1;
} else l = mid+1;
}
cout << ans << endl;
}
int32_t main(){
FastIO();
// int t; cin >> t;
// while(t--)
solve();
return 0;
}
Ly8gCi8vIEBoYW5kbGU6IGltcmFuc2loYWIwCgojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIGludCBsb25nIGxvbmcKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBweSBjb3V0IDw8ICJXSU4iIDw8IGVuZGwKI2RlZmluZSBwbiBjb3V0IDw8ICJMT1NFIiA8PCBlbmRsCiNkZWZpbmUgZmwoYSwgYikgZm9yIChpbnQgaSA9IGE7IGkgPCBiOyBpKyspCiNkZWZpbmUgZmxqKGEsIGIpIGZvciAoaW50IGogPSBhOyBqPCBiOyBqKyspCiNkZWZpbmUgZmxsKGEpIGZvciAoYXV0byAmaSA6IGEpCiNkZWZpbmUgc3NvcnQoYSkgc29ydChhLmJlZ2luKCksIGEuZW5kKCkpCiNkZWZpbmUgc3NvcnRmKGEsIHgpIHNvcnQoYS5iZWdpbigpLCBhLmVuZCgpLCB4KQojZGVmaW5lIHJ2cyhhKSByZXZlcnNlKGEuYmVnaW4oKSwgYS5lbmQoKSkKI2RlZmluZSBhbGwoYSkgKGEpLmJlZ2luKCksIChhKS5lbmQoKQojZGVmaW5lIGVsIGNvdXQgPDwgIlxuIgojZGVmaW5lIGVuZGwgIlxuIgojZGVmaW5lIHN6KGEpIGEuc2l6ZSgpCiNkZWZpbmUgRmFzdElPKCkgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTtjaW4udGllKDApO2NvdXQudGllKDApOwoKZG91YmxlIGRpc3RhbmNlKGludCB4LCBpbnQgeSkgewogICAgcmV0dXJuICh4KngqMS4wKSsoeSp5KjEuMCk7Cn0KCmludCBjb3VudChpbnQgaykgewogICAgaW50IGNudCA9IDA7CiAgICBmb3IoaW50IGk9MTsgaTw9azsgaSsrKSB7ICAgCiAgICAgICAgZm9yKGludCBqPTE7IGo8PWs7IGorKykgewogICAgICAgICAgICBpZihkaXN0YW5jZShpLCBqKSA8PSBrKmspIGNudCsrOwogICAgICAgIH0KICAgIH0KICAgIGNudCAqPSA0OwogICAgY250ICs9ICg0KmspOwogICAgcmV0dXJuIGNudCsxOwp9Cgp2b2lkIHNvbHZlKCkKewogICAgaW50IG47IGNpbiA+PiBuOwogICAgLy8gY291dCA8PCAoaW50KWRpc3RhbmNlKDUsIDApIDw8IGVuZGw7CgogICAgaW50IGwgPSAxLCByID0gMWU0LCBtaWQsIGFucyA9IC0xOwogICAgd2hpbGUobDw9cikgewogICAgICAgIG1pZCA9IChsK3IpPj4xOwogICAgICAgIGludCBmZiA9IGNvdW50KG1pZCk7CiAgICAgICAgaWYoZmYgPj0gbikgewogICAgICAgICAgICBhbnMgPSBtaWQ7CiAgICAgICAgICAgIHIgPSBtaWQtMTsKICAgICAgICB9IGVsc2UgbCA9IG1pZCsxOwogICAgfQogICAgY291dCA8PCBhbnMgPDwgZW5kbDsKfQoKaW50MzJfdCBtYWluKCl7CiAgICBGYXN0SU8oKTsKCiAgICAvLyBpbnQgdDsgY2luID4+IHQ7CiAgICAvLyB3aGlsZSh0LS0pCiAgICAgICAgc29sdmUoKTsKICAgIApyZXR1cm4gMDsKfQ==