codejam 2014 Problem A.