#include using namespace std; int main(){ long long n;cin>>n; long long mn = 1; long long mx = 1000000001; while(mx-mn > 1){ long long ce = (mn+mx)/2; if(ce*ce <= n)mn = ce; else mx = ce; } long long mn2 = 0; long long mx2 = n; while(mx2-mn2 > 1){ long long ce = (mn2+mx2)/2; if(n/ce <= mn)mx2 = ce; else mn2 = ce; } cout << mn + mn2 << endl; }