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