#include <bits/stdc++.h>
using namespace std;
signed main() {
  (ios::sync_with_stdio(0), cout.tie(0), cin.tie(0));
  long long n, rep = 1, ans = 0;
  cin >> n;
  while (n > 0) {
    n -= rep;
    if (ans % 2) ++rep;
    ++ans;
  }
  ++ans;
  cout << ans << '\n';
  ;
}
