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;
#pragma GCC optimize("O3")
const int N = 5e5 + 5;
const int M = 998244353;
long long fact[N], inv[N];
vector<bool> prime;
vector<int> drow4{1, -1, 0, 0};
vector<int> dcol4{0, 0, -1, 1};
vector<int> drow8{0, 1, 1, 1, 0, -1, -1, -1};
vector<int> dcol8{1, 1, 0, -1, -1, -1, 0, 1};
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << "debug statement : " << *it << " = " << a << endl;
  err(++it, args...);
}
long long powerModM(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = (res * x) % M;
    y = y >> 1;
    x = (x * x) % M;
  }
  return res % M;
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
void preCalcFactorial(int n) {
  fact[0] = inv[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fact[i] = (fact[i - 1] * i) % M;
    inv[i] = powerModM(fact[i], M - 2);
  }
}
long long nCr(long long n, long long r) {
  long long ans = ((fact[n] * inv[r]) % M + M) % M;
  ans = ((ans * inv[n - r]) % M + M) % M;
  return ans;
}
void sieve(int n) {
  prime.resize(n + 1, true);
  prime[1] = false;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
class BIT {
 public:
  int size;
  vector<int> v;
  BIT(int second) {
    size = second;
    v.resize(second, 0);
  }
  void update(int i, int delta) {
    while (i < size) {
      v[i] += delta;
      i += i & (-i);
    }
  }
  int sum(int i) {
    int second = 0;
    while (i > 0) {
      second += v[i];
      i -= i & (-i);
    }
    return second;
  }
};
void testCase() {
  int n, val, ans = 0;
  cin >> n;
  val = 1e6 + 5;
  sieve(val);
  for (int m = 1; m <= 1000; m++) {
    if (!prime[m * n + 1]) {
      ans = m;
      break;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    testCase();
  }
}