main :: IO () main = do nstr <- getLine print $ if length nstr > 2 then 8 :: Int else case (read nstr :: Int) of n | n == 4 -> 3 | n == 6 -> 5 | n `elem` [8,9,10,15,16,22] -> 7 | otherwise -> 8