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.util.*; 
        import java.math.*;
        import java.io.*;
        import java.text.DecimalFormat;
        import java.math.BigInteger;
        public class Main{
            //static int d=20;
            static long mod=1000000007 ;
            static HashMap<String,Double> hm=new HashMap<>(); 
            static ArrayList<ArrayList<Integer>> arr;
            static long[] dp1,dp2;
            static int[] a;
            static int[] vis,num;
            static long max;
            static int id;
            public static void main(String[] args)  throws IOException {
                boolean online =false;
                String fileName = "C-large-practice";
                PrintWriter out; 
                if (online) {
                    s.init(new FileInputStream(new File(fileName + ".in")));
                     out= new PrintWriter(new FileWriter(fileName + "out.txt"));
                }
                 else {
                    s.init(System.in);   
                
                    out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
                }
                
                int[] prime=new int[1000002];
                prime[1]=1;
                for(int i=2;i*i<=1000001;i++){
                    if(prime[i]==0){
                        for(int j=2*i;j<=1000001;j+=i)
                            prime[j]=1;
                    }
                }
                int n=s.ni();
                int ans=1;
                for(int i=1;i<=1000;i++){
                    if(prime[i*n+1]!=0){
                        ans=i;
                        break;
                    }

                }
                out.println(ans);
                out.close();
 
            }
            public static boolean check(long x){
                if(x%4==0 || x%7==0 || x%11==0)
                    return true;
                if(x<4 || x<7 || x<11)
                    return false;
                if(x%2==0){
                    return check(x/2);
                }
                else
                    return check(x/2) && check((x+1)/2);
            }
            public static int angle(int x1,int x2,int x3,int y1,int y2,int y3){
                long val=(y2-y1)*1L*(x3-x2)-(y3-y2)*1L*(x2-x1);
                if(val<0)
                    return 1;
                else if(val>0)
                    return -1;
                else
                    return 0;
            }
            
            static class BIT{
            
                int N;
                int tree[];
                
                BIT(int N){
                    this.N = N;
                    tree = new int[N + 1];
                }
                
                void update(int idx){
                    while(idx <= N){
                        tree[idx]++;
                        idx += (idx & -idx);
                    }
                }
                
                int query(int l,int r){
                    if(l == 1)
                        return read(r);
                    else
                        return read(r) - read(l-1);
                }
                
                int read(int idx){
                    int sum = 0;
                    while(idx > 0){
                        sum += tree[idx];
                        idx -= (idx & -idx);
                    }
                    return sum;
                }
            }
            public static boolean pal(String a){
                int i=0;
                int j=a.length()-1;
                while(i<j){
                    if(a.charAt(i)!=a.charAt(j)){
                        return false;
                    }
                    i++;
                    j--;
                }
                return true;
                    
            }
            public static long find(long n,long k){
                if(n==2){
                    if(k==1 || k==3)
                        return 1;
                    else
                        return 2;
                }
                long t=pow2(2,n,mod)-1;
                long z=(t+1)/2;
                if(k==z)
                    return n;
                if(k<z)
                    return find(n-1,k);
                else
                    return find(n-1,k-z);
            }
            public static long pow2(long a,long b,long mod){
                    long ans=1;
                    while(b>0){
                        if(b%2==1)
                            ans=(a*ans)%mod;
                        a=(a*a)%mod;
                        b/=2;
                    }
                    return  ans;
            }
            public static double pow3(double a,long b){
                    double ans=1;
                    while(b>0){
                        if(b%2==1)
                            ans=(a*ans);
                        a=(a*a);
                        b/=2;
                    }
                    return  ans;
            }
 
             static class name implements Comparable<name> {
                long l,b,h;
                public name(long   x,long y,long z){
                    {
                        l=x;
                        b=y;
                    }
                    
                    
                    h=z;
                }
                public int compareTo(name o){
                    return -(int)(l*b-o.l*o.b);
                }
                
            }
            public static class s {
                static BufferedReader reader;
                static StringTokenizer tokenizer;
            
                /** call this method to initialize reader for InputStream */
                static void init(InputStream input) {
                    reader = new BufferedReader(
                                new InputStreamReader(input) );
                    tokenizer = new StringTokenizer("");
                }   
            
                /** get next word */
                static String ns() throws IOException {
                    while ( ! tokenizer.hasMoreTokens() ) {
                        //TODO add check for eof if necessary
                        tokenizer = new StringTokenizer(
                            reader.readLine() );
                    }
                    return tokenizer.nextToken();
                }
            
                static int ni() throws IOException {
                    return Integer.parseInt( ns() );
                }
            
                static double nd() throws IOException {
                    return Double.parseDouble( ns() );
                }
                static long nl() throws IOException {
                    return Long.parseLong( ns() );
                }
            }
        }