Solution for Code Chef Problem 'MARCHA1' (http://www.codechef.com/problems/MARCHA1)