#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  long long last = 0;
  for (int i = 1;; i++) {
    if (i & 1) {
      long long cnt = (1ll * i * i) / 2 + 1;
      if (cnt >= n) {
        int r = n % 4;
        if (r == 2 and i >= 3) {
          cout << i;
          return;
        } else if (r == 3 and i >= 5) {
          cout << i;
          return;
        } else if (r == 1 or r == 0) {
          cout << i;
          return;
        }
      }
    } else {
      if (i != 2 and (n % 4 == 0)) {
        long long c = (i / 4 - 1);
        long long cnt = last + 4 + c * 8;
        last = cnt;
        if (cnt >= n) {
          cout << i;
          return;
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
}
