Programming problem for 2013/2014 ACSL Contest #2