#include <bits/stdc++.h>
int sum(int x) {
  if (x % 2 == 0)
    return x * x / 2;
  else {
    int re = 0;
    for (int i = 1; i <= x; ++i) {
      if (i & 1)
        re += (x + 1) / 2;
      else
        re += x / 2;
    }
    return re;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  int ans = n * 2 - 1;
  if (n & 1) --n;
  for (int L = 1; L <= 1000; ++L) {
    for (int x = 0; x <= L / 2 + L / 2; ++x) {
      int res = n - x * 2;
      if (res >= 0 && res % 4 == 0 && sum(L) >= res / 4) {
        ans = std::min(ans, L * 2 + 1);
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
