#include <bits/stdc++.h>
const int md = 1000000007;
long long inf = 1000000000001;
using namespace std;
using namespace std::chrono;
long long pw(long long a, long long b) {
  int c = 1, m = a;
  while (b) {
    if (b & 1) c = (c * m);
    m = (m * m);
    b /= 2;
  }
  return c;
}
long long pwmd(long long a, long long b) {
  long long c = 1, m = a;
  while (b) {
    if (b & 1) c = (c * m) % md;
    m = (m * m) % md;
    b /= 2;
  }
  return c;
}
long long modinv(long long n) { return pwmd(n, md - 2); }
long long inverse(long long i) {
  if (i == 1) return 1;
  return (md - ((md / i) * inverse(md % i)) % md + md) % md;
}
long long ceel(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
int my_log(int n, int b) {
  long long i = 1;
  long long ans = 0;
  while (1) {
    if (i > n) {
      ans--;
      break;
    }
    if (i == n) break;
    i *= b;
    ans++;
  }
  return ans;
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<char> capl = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                     'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
                     'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
vector<char> sml = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                    'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                    's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
string conv(long long a) {
  string b;
  int c = my_log(a, 2);
  c++;
  b = '1';
  for (int i = 0; i < c - 1; i++) {
    long long k = a >> (c - 2 - i);
    if (k & 1)
      b += '1';
    else
      b += '0';
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int x;
  cin >> x;
  int flag = 0, n = 1, ans, mx;
  while (!flag) {
    if (n % 2) {
      if (n == 1) {
        if (x == 1) ans = n, flag = 1;
      } else {
        mx = (n / 2 + 1) * (n / 2 + 1) + n / 2 * (n / 2);
        if (mx == x)
          ans = n, flag = 1;
        else if (mx > x) {
          int y = mx - x;
          if (y % 4 == 0 || y % 4 == 1 || y % 4 == 3)
            ans = n, flag = 1;
          else if (y % 4 == 2) {
            if (n >= 5) ans = n, flag = 1;
          }
        }
      }
    }
    n++;
  }
  cout << ans;
}

### Prompt

Create a solution in cpp for the following problem:

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>
const int md = 1000000007;
long long inf = 1000000000001;
using namespace std;
using namespace std::chrono;
long long pw(long long a, long long b) {
  int c = 1, m = a;
  while (b) {
    if (b & 1) c = (c * m);
    m = (m * m);
    b /= 2;
  }
  return c;
}
long long pwmd(long long a, long long b) {
  long long c = 1, m = a;
  while (b) {
    if (b & 1) c = (c * m) % md;
    m = (m * m) % md;
    b /= 2;
  }
  return c;
}
long long modinv(long long n) { return pwmd(n, md - 2); }
long long inverse(long long i) {
  if (i == 1) return 1;
  return (md - ((md / i) * inverse(md % i)) % md + md) % md;
}
long long ceel(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
int my_log(int n, int b) {
  long long i = 1;
  long long ans = 0;
  while (1) {
    if (i > n) {
      ans--;
      break;
    }
    if (i == n) break;
    i *= b;
    ans++;
  }
  return ans;
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<char> capl = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                     'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
                     'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
vector<char> sml = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                    'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                    's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
string conv(long long a) {
  string b;
  int c = my_log(a, 2);
  c++;
  b = '1';
  for (int i = 0; i < c - 1; i++) {
    long long k = a >> (c - 2 - i);
    if (k & 1)
      b += '1';
    else
      b += '0';
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int x;
  cin >> x;
  int flag = 0, n = 1, ans, mx;
  while (!flag) {
    if (n % 2) {
      if (n == 1) {
        if (x == 1) ans = n, flag = 1;
      } else {
        mx = (n / 2 + 1) * (n / 2 + 1) + n / 2 * (n / 2);
        if (mx == x)
          ans = n, flag = 1;
        else if (mx > x) {
          int y = mx - x;
          if (y % 4 == 0 || y % 4 == 1 || y % 4 == 3)
            ans = n, flag = 1;
          else if (y % 4 == 2) {
            if (n >= 5) ans = n, flag = 1;
          }
        }
      }
    }
    n++;
  }
  cout << ans;
}

```