Solution to euler 2