#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<vector<long long>> v(25);
  vector<long long> ev(25);
  ev[3] = 0;
  for (long long i = 4; i < 12; i++) ev[i] = abs(ev[i - 1] - 1);
  if (n == 1)
    cout << 1 << endl;
  else {
    for (long long i = 3; i < 25; i += 2) {
      long long x = i * i;
      long long a = x / 2;
      long long b = x - a;
      long long cx = i / 2;
      long long dx = i - cx;
      if (cx % 2 == 0)
        dx--;
      else
        cx--;
      long long aa = a - 2 * dx, bb = b - 2 * cx;
      if (ev[i] == 0)
        bb--;
      else
        aa--;
      aa /= 4;
      bb /= 4;
      aa++;
      bb++;
      while (aa > 0) {
        long long d = dx;
        v[i].push_back(a);
        if (ev[i] == 1 && a > 1) v[i].push_back(a - 1);
        while (d > 0) {
          if (a - 2 * d > 0) v[i].push_back(a - 2 * d);
          if (ev[i] == 1 && a - 1 - 2 * d > 0) {
            v[i].push_back(a - 1 - 2 * d);
          }
          d--;
        }
        a -= 4;
        aa--;
      }
      while (bb > 0) {
        long long c = cx;
        v[i].push_back(b);
        if (ev[i] == 0 && b > 1) v[i].push_back(b - 1);
        while (c > 0) {
          if (b - 2 * c > 0) v[i].push_back(b - 2 * c);
          if (ev[i] == 0 && b - 1 - 2 * c > 0) {
            v[i].push_back(b - 1 - 2 * c);
          }
          c--;
        }
        b -= 4;
        bb--;
      }
    }
    long long res = 0;
    for (long long j = 3; j < 25; j += 2) {
      sort(v[j].begin(), v[j].end());
      v[j].erase(unique(v[j].begin(), v[j].end()), v[j].end());
      ;
      if (binary_search(v[j].begin(), v[j].end(), n)) {
        res = j;
        break;
      }
    }
    cout << res << endl;
  }
  return 0;
}

### Prompt

Construct a CPP code solution to the problem outlined:

Consider some square matrix A with side n consisting of zeros and ones. There are n rows numbered from 1 to n from top to bottom and n columns numbered from 1 to n from left to right in this matrix. We'll denote the element of the matrix which is located at the intersection of the i-row and the j-th column as Ai, j.

Let's call matrix A clear if no two cells containing ones have a common side.

Let's call matrix A symmetrical if it matches the matrices formed from it by a horizontal and/or a vertical reflection. Formally, for each pair (i, j) (1 ≤ i, j ≤ n) both of the following conditions must be met: Ai, j = An - i + 1, j and Ai, j = Ai, n - j + 1.

Let's define the sharpness of matrix A as the number of ones in it.

Given integer x, your task is to find the smallest positive integer n such that there exists a clear symmetrical matrix A with side n and sharpness x.

Input

The only line contains a single integer x (1 ≤ x ≤ 100) — the required sharpness of the matrix.

Output

Print a single number — the sought value of n.

Examples

Input

4


Output

3


Input

9


Output

5

Note

The figure below shows the matrices that correspond to the samples:

<image>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<vector<long long>> v(25);
  vector<long long> ev(25);
  ev[3] = 0;
  for (long long i = 4; i < 12; i++) ev[i] = abs(ev[i - 1] - 1);
  if (n == 1)
    cout << 1 << endl;
  else {
    for (long long i = 3; i < 25; i += 2) {
      long long x = i * i;
      long long a = x / 2;
      long long b = x - a;
      long long cx = i / 2;
      long long dx = i - cx;
      if (cx % 2 == 0)
        dx--;
      else
        cx--;
      long long aa = a - 2 * dx, bb = b - 2 * cx;
      if (ev[i] == 0)
        bb--;
      else
        aa--;
      aa /= 4;
      bb /= 4;
      aa++;
      bb++;
      while (aa > 0) {
        long long d = dx;
        v[i].push_back(a);
        if (ev[i] == 1 && a > 1) v[i].push_back(a - 1);
        while (d > 0) {
          if (a - 2 * d > 0) v[i].push_back(a - 2 * d);
          if (ev[i] == 1 && a - 1 - 2 * d > 0) {
            v[i].push_back(a - 1 - 2 * d);
          }
          d--;
        }
        a -= 4;
        aa--;
      }
      while (bb > 0) {
        long long c = cx;
        v[i].push_back(b);
        if (ev[i] == 0 && b > 1) v[i].push_back(b - 1);
        while (c > 0) {
          if (b - 2 * c > 0) v[i].push_back(b - 2 * c);
          if (ev[i] == 0 && b - 1 - 2 * c > 0) {
            v[i].push_back(b - 1 - 2 * c);
          }
          c--;
        }
        b -= 4;
        bb--;
      }
    }
    long long res = 0;
    for (long long j = 3; j < 25; j += 2) {
      sort(v[j].begin(), v[j].end());
      v[j].erase(unique(v[j].begin(), v[j].end()), v[j].end());
      ;
      if (binary_search(v[j].begin(), v[j].end(), n)) {
        res = j;
        break;
      }
    }
    cout << res << endl;
  }
  return 0;
}

```