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.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.Map.Entry;
	
	
	 public class hehehe {
	    static boolean ans[]=new boolean[1000002];
	    static int count=0;
	    static int flag=0;
		static double eps=(double)1e-6;
		static long mod=(long)1e9+7;
		static int maxcount=0;
		static int index=0;
		public static void main(String args[]){
			InputReader in = new InputReader(System.in);
			OutputStream outputStream = System.out;
			PrintWriter out = new PrintWriter(outputStream);
			Scanner sc=new Scanner(System.in);
			//----------My Code----------
			int t=in.nextInt();
			seive();
			for(int i=1;i<=1000;i++){
				if(ans[t*i+1]==true){
				System.out.println(i);
				break;
				}
			}
			
			//-- -------------The End------------------
			out.close();
		}
		
		static void seive(){
			for(int i=2;i<=Math.sqrt(1000001);i++){
				if(ans[i]==false){
				for(int j=2*i;j<=1000001;j+=i){
					ans[j]=true;
					
				}
				}
			}
		}
		
		
		static int recursiveBinarySearch(int[] sortedArray, int start, int end, int key) {
	
		while (start < end) {
				int mid = start + (end - start) / 2; 
				if (key < sortedArray[mid]) {
					end=mid-1;
	
				} else if (key >=sortedArray[mid]) {
					start=mid+1;
				}
			}
			return (start); 
		}
	
		static long modulo(long a,long b,long c) {
			long x=1;
			long y=a;
			while(b > 0){
				if(b%2 == 1){
					x=(x*y)%c;
				}
			
				y = (y*y)%c; // squaring the base
				b /= 2;
			}
			return  x%c;
		}
		
		
		static long gcd(long x, long y)
		
		{
			long r=0, a, b;
			a = (x > y) ? x : y; // a is greater number
			b = (x < y) ? x : y; // b is smaller number
			r = b;
			while(a % b != 0)
			{
				r = a % b;
				a = b;
				b = r;
			}
			return r;
		}
		static class Pair implements Comparable<Pair> {
			int x;
			int y;
			//int i;
			Pair(int  xx,int yy){
				
				x=xx;
				y=yy;
				//i=ii;
			}
			@Override
			public int compareTo(Pair arg0) {
			
				
				
					return 1;
				
				
			}
		
		}
		static class InputReader {
			public BufferedReader reader;
			public StringTokenizer tokenizer;
	
			public InputReader(InputStream inputstream) {
				reader = new BufferedReader(new InputStreamReader(inputstream));
				tokenizer = null;
			}
	
			public String nextLine(){
				String fullLine=null;
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						fullLine=reader.readLine();
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
					return fullLine;
				}
				return fullLine;
			}
			public String next() {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						tokenizer = new StringTokenizer(reader.readLine());
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
				}
				return tokenizer.nextToken();
			}
			public long nextLong() {
				return Long.parseLong(next());
			}
			public int nextInt() {
				return Integer.parseInt(next());
			}
		}
	}