main :: IO () main = do n <- readLn print $ solve n solve :: Int -> Int solve n | n < 14 = -1 | otherwise = n - 7