Solved Project Euler Problem 2