s = gets.chomp
# s,t = gets.split.map(&:to_s)
# a = gets.split.map(&:to_i)

# s = gets.chomp.chars.uniq
# puts gets.chomp.chars.uniq.size != 1 ? "Yes" : "No"

p 7-(%w(SUN MON TUE WED THU FRI SAT SUN).index(s))