solving euler5