Niyaz Nigmatullin's submission of Counting Terms | CodeChef