s = gets.chomp

if s == "SUN"
  puts "7"
elsif s == "MON"
  puts "6"
elsif s == "TUE"
  puts "5"
elsif s == "WED"
  puts "4"
elsif s == "THU"
  puts "3"
elsif s == "FRI"
  puts "2"
else 
  puts "1"
end
