
main = do
        a <- getLine
        putStrLn $ show (ans a)

ans :: String -> Int
ans a = case a of 
                "SUN" -> 7
                "MON" -> 6
                "TUE" -> 5
                "WED" -> 4
                "THU" -> 3
                "FRI" -> 2
                "SAT" -> 1
