euler 1 solution C