program a
	character(len=3) :: day
    read '(a)', day
    
    if (day == 'MON') then
    	print '(i0)', 6
    else if (day == 'TUE') then
    	print '(i0)', 5
    else if (day == 'WED') then
    	print '(i0)', 4
    else if (day == 'THU') then
    	print '(i0)', 3
    else if (day == 'FRI') then
    	print '(i0)', 2
    else if (day == 'SAT') then
    	print '(i0)', 1
    else if (day == 'SUN') then
    	print '(i0)', 7
    end if

end program a