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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class Main3 {

    public static void main(String[] args) {
        FastScanner scanner = new FastScanner();
        int n = scanner.nextInt();
        for (int m = 1; m <= 1000; m++) {
            int prime = n * m + 1;
            if (!isPrime(prime)) {
                System.out.println(m);
                return;
            }
        }
    }

    private static boolean isPrime(int num) {
        if (num == 2) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
        return true;
    }

    // builds prefix function (x - substr to find)
    public static int[] PrefFunc(String x) {
        if (x.length() == 1) {
            return new int[] {-1};
        }
        int[] T = new int[x.length()];
        int pos = 2;
        int cnd = 0;
        T[0] = -1;
        T[1] = 0;
        while (pos < x.length()) {
            if (x.charAt(pos - 1) == x.charAt(cnd)) {
                cnd++;
                T[pos] = cnd;
                pos++;
            } else if (cnd > 0)
                cnd = T[cnd];
            else {
                T[pos] = 0;
                pos++;
            }
        }
        return T;
    }

    // returns all indexes where s (substr) is located in t (str), starts from "start", f - prefix function
    public static List<Integer> KMP(String s, String t, int start, int[] f) {
        int k = 0;
        List<Integer> result = new ArrayList<>();
        while (true) {
            if (start + k >= t.length()) {
                return result;
            }
            if (t.charAt(start + k) == s.charAt(k)) {
                if (s.length() - 1 == k) {
                    result.add(start);
                    start = start + k - f[k];
                    k = Math.max(0, f[k]);
                } else {
                    k++;
                }
            } else {
                start = start + k - f[k];
                k = Math.max(0, f[k]);
            }
        }
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            try {
                return br.readLine();
            } catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException();
            }
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}