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 ≤ 10^3. 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.

Difficulty: interview

Starter code:

Solutions:
def prime(x):
    if x < 2:
        return False
    if x == 2:
        return True
    if x % 2 == 0:
        return False

    for d in range(3, x, 2):
        if d * d > x:
            break
        if x % d == 0:
            return False

    return True

def main():
    n = int(input())
    for m in range(1, 1001):
        if not prime(n * m + 1):
            ans = m
            break

    print(ans)

main()


n = int(input())
def ispr(m):
	i = 2
	while i * i <= m:
		if m % i == 0:
			return False
		i += 1
	return True
for i in range(1, 1001):
	if not ispr(n * i + 1):
		print(i)
		return

def not_pr(x):
    return sum(x % i == 0 for i in range(2, x)) != 0

read = lambda: map(int, input().split())
n = int(input())
for m in range(1, 1001):
    if not_pr(n * m + 1):
        print(m)
        return

def is_prime(n):
	i = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += 1
	return True

n = int(input())
for i in range(1, 1001):
	if not is_prime(n * i + 1):
		print(i)
		break


def prime(n):
	i = 2
	while (i * i <= n):
		if (n % i == 0):
			return False
		i += 1
	return True

def main(n):
	m = 1
	while(True):
		if (not prime(m * n + 1)):
			print(m)
			return
		m += 1


main(int(input()))


def primesSieve(limit):
    def internalPrimesSieve(limit):
        a = [True] * limit # Initialize the primality list
        a[0] = a[1] = False

        for (i, isprime) in enumerate(a):
            if isprime:
                yield i
                for n in range(i*i, limit, i): # Mark factors non-prime
                    a[n] = False
    return [p for p in internalPrimesSieve(limit)]

n = int(input())
primes = primesSieve(1000002)
for i in range(1,1001):
    if n*i + 1 not in primes:
        print(i)
        break


3

def is_prime(x):
    if x == 1:
        return False
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True


n = int(input())
m = 1
while is_prime(n * m + 1):
    m += 1
print(m)


#!/usr/bin/env python3

def main():
    import itertools

    def is_prime(x):
        if x == 2:
            return True
        if x & 0x1 == 0:
            return False
        i = 3
        while i * i <= x:
            if x % i == 0:
                return False
            i += 2
        return True

    try:
        while True:
            n = int(input())
            for m in itertools.count(1):
                if not is_prime(n * m + 1):
                    print(m)
                    break

    except EOFError:
        pass

main()


n = int(input())

def yes(x):
	if (x < 3):
		return 0
	else:
		for y in range(2,x):
			if (x%y == 0):
				return 1
		return 0


for m in range(1,1001):
	if yes(n*m+1):
		print(m)
		break

n = int(input())

def isPrime(x):
    for j in range(2,round(x**0.5)+1):
        if not x%j: return False
    return True

for m in range(1,1000):
    if not isPrime(m*n+1):
        print(m)
        break

from math import sqrt
n=int(input())
a=0
m=0
while True:
    m+=1
    a=n*m+1
    for i in range(2,int(sqrt(a)+1)):
        if a%i==0:
            print(m)
            return


import math
def is_prime(n):
    if n % 2 == 0 and n > 2: 
        return False
    return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))
n=int(input())
for i in range(1,100):
    if not is_prime(n*i+1):
        print(i)
        break


import math

def is_prime(n):
    if n % 2 == 0 and n > 2: 
        return False
    return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))

n = int(input())
m = 1

while (is_prime((n*m)+1)):
	m+=1
print(m)

#autor @ShymCoder
import math
def is_prime(n):
    if n % 2 == 0 and n > 2: 
        return False
    return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))
n=int(input())
for i in range(1,1001):
    if not is_prime(n*i+1):
        print(i)
        break


n=int(input())

flag=True

m=1
a=[True]*1000001
a[1]=False

for i in range(2,len(a)):
    if a[i]:
        for j in range(2*i,len(a),i):
            a[j]=False

while flag:
    if a[m*n+1]==False:
        flag=False
        print(m)
    else:
        m+=1


def prime(x):
    for i in range(2, 1001):
        if x % i == 0 and i != x:
            return False
    return True


n = int(input())
for m in range(1, 1001):
    if not prime(n * m + 1):
        print(m)
        return




isp = [True]*(10**6+8)
isp[0] = isp[1] = False

i = 2
N = 10**6 + 7
while i*i <= N :
	if isp[i] : 
		for j in range(i*i , N+1 , i  ) : 
			isp[j] = False
	i += 1
n = int(input())
for m in range(1,1001) : 
	if not isp[n*m + 1] :
		print(m)
		break


#!/usr/bin/env pypy3
# -*- coding: UTF-8 -*-
import sys
import re
import math
import itertools
import collections
import bisect
#sys.stdin=file('input.txt')
#sys.stdout=file('output.txt','w')
#10**9+7
mod=1000000007
#mod=1777777777
pi=3.1415926535897932
IS=float('inf')
xy=[(1,0),(-1,0),(0,1),(0,-1)]
bs=[(-1,-1),(-1,1),(1,1),(1,-1)]
def niten(a,b): return abs(a-b) if a>=0 and b>=0 else  a+abs(b) if a>=0 else abs(a)+b if b>=0 else abs(abs(a)-abs(b))
def fib(n): return [(seq.append(seq[i-2] + seq[i-1]), seq[i-2])[1] for seq in [[0, 1]] for i in range(2, n)]
def gcd(a,b): return a if b==0 else gcd(b,a%b)
def lcm(a,b): return a*b/gcd(a,b)
def eucl(x1,y1,x2,y2): return ((x1-x2)**2+(y1-y2)**2)**0.5
def choco(xa,ya,xb,yb,xc,yc,xd,yd): return 1 if abs((yb-ya)*(yd-yc)+(xb-xa)*(xd-xc))<1.e-10 else 0
def pscl(num,l=[1]):
    for i in range(num):
        l = map(lambda x,y:x+y,[0]+l,l+[0])
    return l

def prime_t(t):
    i=2
    while i**2<=t:
        if t%i==0:
            return 0
        i+=1
    return 1

l=[]
for i in range(2,10000):
    if prime_t(i):
        l.append(i)

n=int(input())
for i in range(1,1001):
    if (n*i+1) not in l:
        print(i)
        return

import math


def check(n):
    q = int(math.sqrt(n))
    for i in range(2, q + 1):
        if not (n % i):
            return False
    return True


n = int(input())
for i in range(1, 1000):
    if not check(n * i + 1):
        print(i)
        break