import Control.Monad

data DayOfWeek = SUN | MON | TUE | WED | THU | FRI | SAT
  deriving (Read, Show)

main :: IO ()
main = do
  s <- readLn
  print $ solve s

solve :: DayOfWeek -> Int
solve SUN = 7
solve MON = 6
solve TUE = 5
solve WED = 4
solve THU = 3
solve FRI = 2
solve SAT = 1
