# [Charcoal], <s>16</s> 13 bytes IL⊟⪪⭆A›×ι⊕κ¹1 [Try it online!][TIO-knmevezy] Link is to verbose version of code. Requires input sorted in descending order. Edit: Saved 3 bytes after following @DominicvanEssen's advice. Explanation: A Input array ⭆ Map over elements and join κ Current index ⊕ Incremented × Multiplied by ι Current value › Is greater than ¹ Literal `1` ⪪ Split on 1 Literal string `1` ⊟ Pop last element L Length I Cast to string Implicitly print [Charcoal]: https://github.com/somebody1234/Charcoal [TIO-knmevezy]: https://tio.run/##LYo9C8IwFAB3f0XGF4ilVRCho0MXLRncSodQHiaQD01e9OfHRFyO47hNq7gFZUv5aGORwRwIpoiKMMLdOExwM9647ODFBbuif5CuWn3gnDOZk4YsmAzPVsedjMYTXFQi@M@5fmMpy9J3Z8H67tRwbDj8sK5l/7Zf "Charcoal – Try It Online"