#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int K;
  for (K = 0; K * K < N; ++K) {
    continue;
  }
  int res = 2 * K;
  for (int i = K * K; i >= N; --i) {
    for (int j = K; j >= 1; --j) {
      if (j + i / j > res) break;
      if (i % j == 0) res = min(res, j + i / j);
    }
  }
  cout << res;
}
