x = int(eval(input()))

ps = set(range(x, 4 * x + 1))

for i in range(2, x):

    for j in range(0, 4 * x + 1, i):

        if j in ps:

            ps.remove(j)

print((min(ps)))

import numpy as np

def make_prime(U):

    is_prime = np.zeros(U,np.bool)

    is_prime[2] = 1

    is_prime[3::2] = 1

    M = int(U**.5)+1

    for p in range(3,M,2):

        if is_prime[p]:

            is_prime[p*p::p+p] = 0

    return is_prime.nonzero()[0] #, is_prime



primes = make_prime(10 ** 5 + 10000)

n = int(eval(input()))

i = np.where(primes >= n)[0][0]

print((primes[i]))
x = int(eval(input()))
ps = set(range(x, 4 * x + 1))
for i in range(2, x):
    for j in range(0, 4 * x + 1, i):
        if j in ps:
            ps.remove(j)
print((min(ps)))

import numpy as np


def make_prime(U):
    is_prime = np.zeros(U, np.bool)
    is_prime[2] = 1
    is_prime[3::2] = 1
    M = int(U**0.5) + 1
    for p in range(3, M, 2):
        if is_prime[p]:
            is_prime[p * p :: p + p] = 0
    return is_prime.nonzero()[0]  # , is_prime


primes = make_prime(10**5 + 10000)
n = int(eval(input()))
i = np.where(primes >= n)[0][0]
print((primes[i]))

-x = int(eval(input())) -ps = set(range(x, 4 * x + 1)) -for i in range(2, x): -    for j in range(0, 4 * x + 1, i): -        if j in ps: -            ps.remove(j) -print((min(ps))) +import numpy as np + + +def make_prime(U): +    is_prime = np.zeros(U, np.bool) +    is_prime[2] = 1 +    is_prime[3::2] = 1 +    M = int(U**0.5) + 1 +    for p in range(3, M, 2): +        if is_prime[p]: +            is_prime[p * p :: p + p] = 0 +    return is_prime.nonzero()[0]  # , is_prime + + +primes = make_prime(10**5 + 10000) +n = int(eval(input())) +i = np.where(primes >= n)[0][0] +print((primes[i]))