Project Euler problem 7 (https://projecteuler.net/problem=7)