str = gets

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