program sample
	implicit none
    character(len=3) :: a
    
    
    if (a=='SUN') then
    	write(*,*) 7
    else if (a=='MON') then    
        write(*,*) 6
    else if (a=='TUE') then    
        write(*,*) 5  
    else if (a=='WED') then    
        write(*,*) 4      
    else if (a=='THU') then    
        write(*,*) 2
    else if (a=='FRI') then    
        write(*,*) 2
    else
    	write(*,*) 1
    end if    
    stop
end program sample