s = gets
if s == "SUN\n"
  put 7
elsif s == "MON\n"
  puts 6
elsif s == "TUE\n"
  puts 5
elsif s == "WED\n"
  puts 4
elsif s == "THU\n"
  puts 3
elsif s == "FRI\n"
  puts 2
elsif s == "SAT\n"
  puts 1
end
