problem 2 from site: http://projecteuler.net/