data Day = SUN | MON | TUE | WED | THU | FRI | SAT
           deriving (Enum, Read)

main :: IO ()
main = solve <$> getDay >>= print

getDay :: IO Day
getDay = read <$> getLine

solve :: Day -> Int
solve = (7 -) . fromEnum
