Solution of problem 2

https://projecteuler.net/problem=2