Golang - solution based on sorting
\nfunc fillCups(amount []int) int {\n    sort.Ints(amount)\n    a, b := amount[0] + amount[1], amount[2]\n    if a < b {\n        return b\n    }\n    return b 
```\nfunc fillCups(amount []int) int {\n    sort.Ints(amount)\n    a, b := amount[0] + amount[1], amount[2]\n    if a < b {\n        return b\n    }\n    return b + (a - b + 1) / 2\n}\n```
['Go']