program W implicit none character(3)::S1,S2 read*,S1,S2 print"(A,i0)","8/",31+merge(merge(2,1,S2=="Sun".or.S2=="Sat"),0,S1=="Sun".or.S1=="Sat") end program W