Solution of project euler 20