week = gets.chomp

case week
when "SUN"
    int = 7
when "MON"
    int = 6
when "TUE"
    int = 5
when "WED"
    int = 4
when "THU"
    int = 3
when "FRI"
    int = 2
when "SAT"
    int = 1
end
    
puts int