import Data.List

day :: [String]
day = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]

main = print =<< ((pure nextDay) <*> getLine)

nextDay :: String -> Int
nextDay s = (8 - ) $ (+ 1) $ (\(Just t) -> t) $ elemIndex s day

