#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, root, sum = 0;
  cin >> n;
  root = sqrt(n);
  for (i = root; i >= 1; i--) {
    sum = sum + i;
    break;
  }
  for (i = root; i <= n; i++) {
    sum = sum + i;
    break;
  }
  cout << sum - 2 << endl;
  return 0;
}
