Problem Five for Project Euler.