using C=System.Console;class M{static void Main(){C.WriteLine(C.Read()%7*2+~(2>>~-int.Parse(C.ReadLine())/15));Main();}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page