S = gets.chomp
if S == "SUN" then
  puts 7
end
if S == "MON" then
  puts 6
end
if S == "TUE" then
  puts 5
end
if S == "WED" then
  puts 4 
end
if S == "THU" then
  puts 3 
end
if S == "FRI" then
  puts 2
end
if S == "SUT" then
  puts 1
end