Round 1C 2014 - Problem A. Part Elf