import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

main = panaA

panaA = do
    let sequence = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    [k] <- getIntList
    print $ sequence!!(fromIntegral k - 1)
  

readInt = fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine