import Data.List
import Data.Maybe

main = print =<< sol <$> readLn

sol = fromJust . find isPrime . enumFrom

isPrime 1 = False
isPrime 2 = True
isPrime n = all ((>0) . mod n) [2..ceiling . sqrt $ fromIntegral n]
