import Data.List

main :: IO ()
main = do
  s <- getLine
  print $ ans s

ans :: String -> Int
ans s = (\(Just a) -> a) $ elemIndex s week
  where week = ["","SAT","FRI","THU","WED","TUE","MON","SUN"]