S = gets.chomp

if S == "SUN"
  print("7")
elsif S == "MON"
  print("6")
elsif S == "TUE"
  print("5")
elsif S == "WED"
  print("4")
elsif S == "THU"
  print("3")
elsif S == "FRI"
  print("2")
elsif S == "SAT"
  print("1")
end