Problem: PolandBall is a young, clever Ball. He is interested in prime numbers. He has stated a following hypothesis: "There exists such a positive integer n that for each positive integer m number n·m + 1 is a prime number".

Unfortunately, PolandBall is not experienced yet and doesn't know that his hypothesis is incorrect. Could you prove it wrong? Write a program that finds a counterexample for any n.

Input

The only number in the input is n (1 ≤ n ≤ 1000) — number from the PolandBall's hypothesis. 

Output

Output such m that n·m + 1 is not a prime number. Your answer will be considered correct if you output any suitable m such that 1 ≤ m ≤ 103. It is guaranteed the the answer exists.

Examples

Input

3


Output

1

Input

4


Output

2

Note

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.

For the first sample testcase, 3·1 + 1 = 4. We can output 1.

In the second sample testcase, 4·1 + 1 = 5. We cannot output 1 because 5 is prime. However, m = 2 is okay since 4·2 + 1 = 9, which is not a prime number.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void IO(T &x) {
  char c = getchar();
  T sgn = 1;
  while (c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  x = 0;
  while (c >= '0' && c <= '9') {
    x = (T)(x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  x *= sgn;
}
template <class T>
T POW(T b, T push) {
  T res = 1;
  while (push > 0) {
    if (push & 1) res *= b;
    push >>= (1ll), b *= b;
  }
  return res;
}
template <class T>
T bMOD(T a, T push, T m) {
  if (push == 0) return (T)1;
  if (!(push & 1)) {
    T temp = bMOD(a, push / 2, m);
    return ((temp % m) * (temp % m)) % m;
  }
  return ((a % m) * (bMOD(a, push - 1, m) % m)) % m;
}
template <class T>
T inMOD(T a, T m) {
  return bMOD(a, m - 2, m);
}
template <class T>
bool isPrime(T n) {
  for (T i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
template <class T>
string toString(T n) {
  stringstream second;
  string num;
  second << n;
  second >> num;
  return num;
}
template <class T>
T sq(T n) {
  return (n * n);
}
template <class T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
bool iseq(double a, double b) { return fabs(a - b) < 1e-9; }
template <class T>
T toDeg(T x) {
  return (180.0 * x) / ((T)acos(-1.0));
}
template <class T>
T toReg(T x) {
  return (x * (T)acos(-1.0)) / (180.0);
}
template <class T>
double _distance(T x1, T y1, T x2, T y2) {
  return 1.0 * sqrt(sq(x1 - x2) + sq(y1 - y2));
}
int kx[] = {-2, -2, +2, +2, +1, -1, +1, -1};
int ky[] = {+1, -1, +1, -1, -2, -2, +2, +2};
int dx[] = {+0, +0, -1, +1, +1, +1, -1, -1};
int dy[] = {+1, -1, +0, +0, -1, +1, +1, -1};
bool dp[100001];
void seive() {
  dp[0] = true;
  dp[1] = true;
  int i, j, k = 0;
  for (i = 4; i <= 100000; i += 2) {
    dp[i] = true;
  }
  for (i = 3; i * i <= 100000; i += 2) {
    if (dp[i] == false) {
      for (j = i * i; j <= 100000; j += i) {
        dp[j] = true;
      }
    }
  }
}
int main() {
  seive();
  int n;
  cin >> n;
  for (int i = 1; i <= 1000; i++) {
    if (dp[n * i + 1] == true) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}