# [05AB1E], <s>8</s> 7 bytes εL¾+èO¼ [Try it online!][TIO-jihqo0iz] [05AB1E]: https://github.com/Adriandmen/05AB1E [TIO-jihqo0iz]: https://tio.run/##MzBNTDJM/f//3FafQ/u0D6/wP7Tn//9oIwsdIx0TIDYGYxMdUx3jWAA "05AB1E – Try It Online" **Explanation** ε # apply to each element x of the input L # push range [1 ... x] ¾+ # add counter to each (initially 0) è # cyclically index into input with each O # sum ¼ # increment counter