Google Codejam 2010 Round 1A Problem A.