#include <bits/stdc++.h>
using namespace std;
static const long long maxLL = (long long)1 << 62;
const long long MOD = 1000000007;
const long long INF = 1e18;
long long N;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  long long ans = INF;
  for (long long i = 1; i * i <= N; i++) {
    if (N % i == 0) {
      ans = min((ans), (i + N / i));
    } else {
      ans = min((ans), (i + N / i + 1));
    }
  }
  cout << ans << '\n';
  return 0;
}
