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

Solution:
#!/usr/bin/env python3
# 755A_hypo.py - Codeforces.com/problemset/problem/755/A by Sergey 2017

import unittest
import sys

###############################################################################
# Hypo Class (Main Program)
###############################################################################


class Primes:
    """ Primes representation """

    def __init__(self, maxn=10**5):
        """ Default constructor """
        self.pfs = [0] * (maxn + 1)
        self.primes = []
        for i in range(2, maxn + 1):
            if self.pfs[i] == 0:
                self.pfs[i] = i
                self.primes.append(i)
                s = i * i
                if s <= maxn:
                    for j in range(s, maxn + 1, i):
                        self.pfs[j] = i

    def pf(self, n):
        return self.pfs[n]

    def is_prime(self, n):
        return n > 1 and self.pf(n) == n


class Hypo:
    """ Hypo representation """

    def __init__(self, test_inputs=None):
        """ Default constructor """

        it = iter(test_inputs.split("\n")) if test_inputs else None

        def uinput():
            return next(it) if it else sys.stdin.readline().rstrip()

        # Reading single elements
        [self.n] = map(int, uinput().split())

        self.prm = Primes()

    def is_prime(self, p):
        return self.prm.is_prime(p)

    def calculate(self):
        """ Main calcualtion function of the class """

        result = 0

        for m in range(1, 1001):
            if not self.is_prime(self.n * m + 1):
                result = m
                break

        return str(result)

###############################################################################
# Unit Tests
###############################################################################


class unitTests(unittest.TestCase):

    def test_single_test(self):
        """ Hypo class testing """

        # Constructor test
        test = "3"
        d = Hypo(test)
        self.assertEqual(d.n, 3)

        # Prime test
        d = Hypo(test)
        self.assertEqual(d.is_prime(1), 0)
        self.assertEqual(d.is_prime(2), 1)
        self.assertEqual(d.is_prime(3), 1)
        self.assertEqual(d.is_prime(4), 0)
        self.assertEqual(d.is_prime(6), 0)

        # Sample test
        self.assertEqual(Hypo(test).calculate(), "1")

        # Sample test
        test = "4"
        self.assertEqual(Hypo(test).calculate(), "2")

        # Sample test
        test = "1000"
        self.assertEqual(Hypo(test).calculate(), "0")

        # My tests
        test = ""
        # self.assertEqual(Hypo(test).calculate(), "0")

        # Time limit test
        # self.time_limit_test(5000)

    def time_limit_test(self, nmax):
        """ Timelimit testing """
        import random
        import timeit

        # Random inputs
        test = str(nmax) + " " + str(nmax) + "\n"
        numnums = [str(i) + " " + str(i+1) for i in range(nmax)]
        test += "\n".join(numnums) + "\n"
        nums = [random.randint(1, 10000) for i in range(nmax)]
        test += " ".join(map(str, nums)) + "\n"

        # Run the test
        start = timeit.default_timer()
        d = Hypo(test)
        calc = timeit.default_timer()
        d.calculate()
        stop = timeit.default_timer()
        print("\nTimelimit Test: " +
              "{0:.3f}s (init {1:.3f}s calc {2:.3f}s)".
              format(stop-start, calc-start, stop-calc))

if __name__ == "__main__":

    # Avoiding recursion limitaions
    sys.setrecursionlimit(100000)

    if sys.argv[-1] == "-ut":
        unittest.main(argv=[" "])

    # Print the result string
    sys.stdout.write(Hypo().calculate())