Problem 8 from Project Euler