# https://atcoder.jp/contests/abc146/tasks/abc146_a



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

