#include #include using namespace std; typedef long long ll; int main(){ ll n; cin >> n; cout << (ll)(sqrt(4*n+1))-1 << endl; return 0; }