while(1>0)println{val s=readLine;2*s(0)%43+(2>>30/s.tail.toInt)}