#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  switch (n) {
    case 1:
      cout << 1;
      break;
    case 2:
      cout << 3;
      break;
    case 3:
      cout << 5;
      break;
    case 4:
    case 5:
      cout << 3;
      break;
    case 6:
    case 7:
      cout << 5;
      break;
    default:
      int n4 = n / 4;
      if (n4 % 2)
        n4 = n4 * 2 - 1;
      else
        n4 = n4 * 2;
      int row = sqrt(n4);
      if (row * row < n4) ++row;
      int a = (row - 1) * (row - 1);
      int m = a / 2;
      if (m * 2 < a) m++;
      int l = n - m * 4;
      if (l <= 1 + ((row - 1) / 2) * 4) row--;
      cout << row * 2 + 1;
  }
}
