#include <bits/stdc++.h>
using namespace std;
int get(int x) {
  if (x <= 0) return 0;
  if (x & 1)
    return (x / 2 + 1) * (x / 2 + 1) + (x / 2) * (x / 2);
  else
    return x * x / 2;
}
int main() {
  int x;
  scanf("%d", &x);
  int ans = 0;
  int n, m;
  int xx = x;
  if (xx & 1) xx--;
  if (x & 1) {
    x--;
    n = x / 4;
    m = x % 4;
    x++;
  } else {
    n = x / 4;
    m = x % 4;
  }
  for (int i = 1;; i++) {
    if ((i & 1) == 0 && (x & 1)) continue;
    int l1, l2;
    if (i & 1) {
      l1 = (i - 1) / 2;
    } else {
      l1 = i / 2 - 1;
    }
    int y = get(l1);
    if (i & 1) {
      if (l1 & 1) {
        l2 = l1 / 2;
        if (x & 1) {
          l2 *= 4;
          if (m) {
            if (l2 < 2) continue;
            l2 -= 4;
          }
          if (y * 4 + l2 >= n * 4) {
            ans = i;
            break;
          }
        } else {
          l2 *= 4;
          if (m) {
            if (l2 < 2) {
              l2 = (l1 + 1) / 2;
              l2 *= 4;
              if (l2 < 2) continue;
              y--;
            }
            l2 -= 4;
          }
          if (y * 4 + l2 >= n * 4) {
            ans = i;
            break;
          }
        }
      } else {
        l2 = l1 / 2 * 4;
        if (m) {
          if (l2 < 2) continue;
          l2 -= 4;
        }
        if (y * 4 + l2 >= n * 4) {
          ans = i;
          break;
        }
      }
    } else {
      if (x % 4 == 0 && y * 4 >= xx) {
        ans = i;
        break;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
