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.*;
import java.util.*;
import java.math.*;

 public class VENTURECUP1{
    final int M = (int) 1e9 + 7;
    int md=(int)(1e7+1);
     int[] SMP=new int[md];
    final double eps = 1e-6;
    final double pi = Math.PI;
    final long inf = Long.MAX_VALUE / 2;
    boolean P[] = new boolean[10000001] ;
     public static int LPFAC[] = new int[10000001];
    //------------> Solution starts here!!
    @SuppressWarnings("Main Logic")
 void solve()
 {
	 Sieve();
int n=ii();
int ans=0;
for(int m=1;m<=1000;m++)
{
	if(!P[n*m+1])
	{
		ans=m;
		break;
	}
}
out.println(ans);








}
    //------------> Solution ends here!!
    InputStream obj;
    PrintWriter out;
    String check = "";

    public static void main(String[] args) throws IOException
    {    new Thread(null, new Runnable() {
            public void run() {
                try {
                    new VENTURECUP1().main1();
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (StackOverflowError e) {
                    System.out.println("RTE");
                }
            }
        }, "1", 1 << 26).start();
    }

   void main1() throws IOException {
        out = new PrintWriter(System.out);
        obj = check.isEmpty() ? System.in : new ByteArrayInputStream(check.getBytes());
        // obj=check.isEmpty() ? new FileInputStream("/home/input.txt") : new ByteArrayInputStream(check.getBytes());
        solve();
        out.flush();
        out.close();
    }

    byte inbuffer[] = new byte[1024];
    int lenbuffer = 0, ptrbuffer = 0;

    int readByte() {
        if (lenbuffer == -1) throw new InputMismatchException();
        if (ptrbuffer >= lenbuffer) {
            ptrbuffer = 0;
            try {
                lenbuffer = obj.read(inbuffer);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        if (lenbuffer <= 0) return -1;
        return inbuffer[ptrbuffer++];
    }
     public String readLine() {
		        int c = readByte();
		        while (isSpaceChar(c))
		            c = readByte();
		        StringBuilder res = new StringBuilder();
		        do {
		            res.appendCodePoint(c);
		            c = readByte();
		        } while (!isEndOfLine(c));
		        return res.toString();
    }
    public boolean isEndOfLine(int c) {
	        return c == '\n' || c == '\r' || c == -1;
    }

    String is() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) // when nextLine, (isSpaceChar(b) && b!=' ')
        {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

 public   int ii() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    long il() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    boolean isSpaceChar(int c) {
        return (!(c >= 33 && c <= 126));
    }


      int skip()
        {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
        }

    float nf() {
        return Float.parseFloat(is());
    }

    double id() {
        return Double.parseDouble(is());
    }

    char ic() {
        return (char) skip();
    }

    int[] iia(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) a[i] = ii();
        return a;
    }

    long[] ila(int n) {
        long a[] = new long[n];
        for (int i = 0; i < n; i++) a[i] = il();
        return a;
    }

    String[] isa(int n) {
        String a[] = new String[n];
        for (int i = 0; i < n; i++) a[i] = is();
        return a;
    }

    int gcd(int a,int b)
    {
		if(a==0)
		return b;
		else  return gcd(b%a,a);

		}
	 long mul(long a, long b) { return a * b % M; }
	 long pow(long a, long k)
	 {
				if (k == 0)
					return 1;
				long p = pow(a, k / 2);
				p = mul(p, p);
				if (k % 2 == 1)
					p = mul(p, a);
				return p;

	}

		long div(long a, long b)
			 {
				return mul(a, pow(b, M - 2));

	           }

     public int[] Characterfrequency(String S)
     {
		 int[] F=new int[256];
		 for(int i=0;i<S.length();i++)
		 {
			 F[(int)S.charAt(i)]++;

		 }
           return F;
	}

public  int[] radixSort(int[] f)
{
	int[] to = new int[f.length];
	{
		int[] b = new int[65537];
		for(int i = 0;i < f.length;i++)b[1+(f[i]&0xffff)]++;
		for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
		for(int i = 0;i < f.length;i++)to[b[f[i]&0xffff]++] = f[i];
		int[] d = f; f = to;to = d;
	}
	{
		int[] b = new int[65537];
		for(int i = 0;i < f.length;i++)b[1+(f[i]>>>16)]++;
		for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
		for(int i = 0;i < f.length;i++)to[b[f[i]>>>16]++] = f[i];
		int[] d = f; f = to;to = d;
	}
	return f;
}
void Sieve(){
 		Arrays.fill(P,true) ;
 		Arrays.fill(LPFAC,0);
 		P[0]=false ;
 		P[1]=false ;
 		for(int i=2 ; i<=10000000 ; i++)
 		   {
 			if(P[i])
 			 {
 				//int j=i*i ;
 				LPFAC[i]=i;
 				for(int j=2;i*j<=10000000;j++)
 				{
					P[i*j]=false;
					if(LPFAC[i*j]==0)LPFAC[i*j]=i;

				}

 			 }
 		  }
	}
public    int[] LPFAC(int max,int[] SMP)
    {
		Arrays.fill(SMP,0);
        for(int i=2;i<max;i++)
        {

			if(SMP[i]==0)
			SMP[i]=i;

			for(int j=i;j<max;j+=i)
			{
			  if(SMP[j]==0) SMP[j]=i;

			}
		}
       return SMP;
     }




    double[][] idm(int n, int m) {
        double a[][] = new double[n][m];
        for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) a[i][j] = id();
        return a;
    }

    int[][] iim(int n, int m) {
        int a[][] = new int[n][m];
        for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) a[i][j] = ii();
        return a;
    }









}