#pragma GCC optimize("Ofast")
#include <iostream>
#include <math.h>
#include <cstdint>
using namespace std;
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x << " = " << x << endl
#else
#define debug(x)
#endif
using ll = long long;
void Solve()
{
int n;
cin >> n;
int c = ceil(sqrt(n));
int f = floor(sqrt(n));
if(c == f) cout << c + f - 1 << endl;
else cout << f + f << endl;
}
int32_t main()
{
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
ll t = 1;
// cin >> t;
while (t--)
Solve();
return 0;
}