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;
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
inline long long gcd(long long a, long long b) {
  a = ((a) < 0 ? -(a) : (a));
  b = ((b) < 0 ? -(b) : (b));
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
long long ext_gcd(long long A, long long B, long long *X, long long *Y) {
  long long x2, y2, x1, y1, x, y, r2, r1, q, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = A, r1 = B; r1 != 0;
       r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y) {
    q = r2 / r1;
    r = r2 % r1;
    x = x2 - (q * x1);
    y = y2 - (q * y1);
  }
  *X = x2;
  *Y = y2;
  return r2;
}
inline long long modInv(long long a, long long m) {
  long long x, y;
  ext_gcd(a, m, &x, &y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
inline long long bigmod(long long a, long long p, long long m) {
  long long res = 1 % m, x = a % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
inline int STRLEN(char *s) {
  int p = 0;
  while (s[p]) p++;
  return p;
}
inline long long SQRT(long long a) {
  long long v = sqrt(a);
  if (((v) * (v)) == a)
    return v;
  else if (((v + 1) * (v + 1)) == a)
    return v + 1;
  else if (((v + 2) * (v + 2)) == a)
    return v + 2;
  else
    return -1;
}
const long long inf = 10000000000000000;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
bool mark[10000055];
vector<int> pL;
void seive() {
  memset(mark, true, sizeof(mark));
  mark[0] = mark[1] = false;
  for (int i = 4; i < 10000055; i += 2) mark[i] = false;
  for (int i = 3; i * i <= 10000055; i += 2) {
    if (mark[i]) {
      for (int j = i * i; j < 10000055; j += 2 * i) mark[j] = false;
    }
  }
  pL.push_back(2);
  for (int i = 3; i < 10000055; i += 2) {
    if (mark[i]) {
      pL.push_back(i);
    }
  }
}
int N, M;
int solve() {
  for (M = 1; M <= 1000; M++) {
    if (mark[N * M + 1] == false) return M;
  }
  return 0;
}
int main() {
  seive();
  cin >> N;
  cout << solve() << endl;
  return 0;
}