#[K4][1], <s>13</s> <s>12</s> 11 bytes **Solution:** (*1?)\[0<;] **Examples:** q)k)(*1?)\[0<;] 100 100 77 30 17 12 2 0 q)k)(*1?)\[0<;] 100 100 37 28 20 2 0 q)k)(*1?)\[0<;] 100 100 77 61 55 53 6 2 0 q)k)(*1?)\[0<;] 100 100 12 1 0 **Explanation:** [Iterate][2] over expression while x is greater than zero. (*1?)\[0<;] / the solution ( )\[0<;] / iterate over brackets whilst 0< evaluates true 1? / 1 choose (returns a 1-item list) * / take the first **Bonus:** A **14 byte** solution that also works in [K (oK)]; this one is an if/else version of the same theme: {$[x;*1?x;x]}\ [Try it online!][TIO-jjiobqb9] [K (oK)]: https://github.com/JohnEarnest/ok [TIO-jjiobqb9]: https://tio.run/##y9bNz/7/v1olusJay9C@wroitjbGyMDg/38A "K (oK) – Try It Online" [1]: http://kx.com/download/ [2]: https://code.kx.com/q/ref/adverbs/#converge-iterate