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