✅ JavaScript Solution || Fast & Easy to understand || Simple
\nvar fillCups = function(amount) {\n    var count = 0\n    var a = amount\n    while (eval(a.join("+")) > 0) {\n        var max = Math.max(...a)\n        a.spl
```\nvar fillCups = function(amount) {\n    var count = 0\n    var a = amount\n    while (eval(a.join("+")) > 0) {\n        var max = Math.max(...a)\n        a.splice(a.indexOf(max), 1)\n        var max2 = Math.max(...a)\n        a.splice(a.indexOf(max2), 1)\n        count++\n        if(max == 0) a.push(0)\n        else a.push(max - 1)\n        if (max2==0) a.push(0)\n        else a.push(max2 - 1)\n    } return count\n}\n```
['Array', 'JavaScript']