import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List

readInts = map read . words <$> getLine :: IO [Int]

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

solve :: Day -> Int
solve s = 7 - fromEnum s

main = solve <$> readLn >>= print