program Cant_Wait_for_Holiday
  implicit none
  character(3) :: s
  integer :: n
  read(*,*) s
  select case (s)
    case ("SUN")
      n = 7
    case ("MON")
      n = 6
    case ("TUE")
      n = 5
    case ("WED")
      n = 4
    case ("THU")
      n = 3
    case ("FRI")
      n = 2
    case ("SAT")
      n = 1
  end select
  write(*,'(i0)') n
end program Cant_Wait_for_Holiday