#include <bits/stdc++.h>
int x, high[110];
int chck(int n, int x);
int cal(int n);
int main() {
  int i, j, k, l, test, t = 1;
  while (scanf("%d", &x) == 1) {
    high[0] = 0;
    for (i = 1; i <= 100; i++) {
      if (chck(i, x)) {
        printf("%d\n", i);
        break;
      }
    }
  }
  return 0;
}
int cal(int n) {
  int i, rem, odd, even, ret;
  rem = n;
  odd = (rem / 2) + (rem % 2);
  odd *= odd;
  even = (rem / 2);
  even *= even;
  return (even + odd);
}
int chck(int n, int x) {
  int i, j, k, l, can, rem, ori = x, odd, even, hi;
  if (n == 3) {
    if (x <= 5 && x != 3) return 1;
    return 0;
  }
  if (n % 2) {
    rem = (n - 1) / 2;
    hi = cal(rem);
    if (x % 2) x--;
    int rem1 = hi;
    while (x >= 4 && rem1 > 0) {
      rem1--;
      x -= 4;
      if (rem1 < 0) break;
    }
    if (!x) return 1;
    if (rem1 != 0 && rem % 2 && ori % 2 == 0)
      rem1 = 2;
    else
      rem1 = 0;
    rem1 += (rem / 2) * 2;
    while (x >= 2 && rem1 > 0) {
      rem1--;
      x -= 2;
      if (rem1 < 0) return 0;
    }
    if (!x) return 1;
    return 0;
  } else {
    rem = ((n / 2) - 1);
    high[n] = cal(rem) * 4;
    if (rem <= 0) return 0;
    if (x % 4) return 0;
    if (x <= high[n]) return 1;
    return 0;
  }
}
