Solution to https://projecteuler.net/problem=1