http://www.codechef.com/APRIL13/problems/LEVY