worked on Euler problem three