Greedy coin counter