Euler 2 solution