! 2019.11.24
!
      program answer
      implicit none
      character(len=3) :: day
      read(*,*) day
      if(day == 'SUN') then
       write(*,*) '7'
      else if(day == 'MON') then
        write(*,*) '6'
      else if(day == 'MON') then
        write(*,*) '6'
      else if(day == 'TUE') then
        write(*,*) '5'
      else if(day == 'WED') then
        write(*,*) '4'
      else if(day == 'THU') then
        write(*,*) '3'
      else if(day == 'FRI') then
        write(*,*) '2'
      else if(day == 'SAT') then
        write(*,*) '1'
      end if
      end program answer