let rec fix f x = f (fix f) x
let days = [|"SUN";"MON";"TUE";"WED";"THU";"FRI";"SAT"|]
let () = Scanf.scanf "%s" @@ fun s ->
  fix (fun f i ->
    if s = days.(i) then Printf.printf "%d\n" (7-i)
    else f (i+1)) 0

