Greedy algorithm for Egyptian fractions