let l = ["SUN";"MON";"TUE";"WED";"THU";"FRI";"SAT";"SUN"]
let s = read_line ()
let f s = match s with
|"MON"-> 6 |"TUE"-> 5 |"WED"-> 4 |"THU"-> 3
|"FRI"-> 2 |"SAT"-> 1 |"SUN"-> 7
let () = print_int (f s)