Updated Project Euler 7