Completed euler prob 3