s = gets.chomp

case s
  when 'SUN' then
    puts 7
  when 'MON' then
    puts 6
  when 'TUE' then
    puts 5
  when 'WED' then
    puts 4
  when 'THU' then
    puts 3
  when 'FRI' then
    puts 2
  when 'SAT' then
    puts 1
end
    