solution 1 to euler