adding project euler solution 40