str = io.read()
if str=="SAT" then
  print(1)
elseif str=="FRI" then
  print(2)
elseif str=="THU" then
  print(3)
elseif str=="WED" then
  print(4)
elseif str=="TUE" then
  print(5)
elseif str=="MON" then
  print(6)
else
  print(7)
end