# [Japt], <s>31</s> 18 bytes -13 bytes thanks to [@ETHproductions](https://codegolf.stackexchange.com/users/42545/ethproductions) This approach doesn't work well using Japt. [Justin's solution](https://codegolf.stackexchange.com/a/138194/61613) is much better. [U*Ål U¬£tYÃUå+]xx ##Explanation: [U*Ål U¬£tYÃUå+]xx [ ] // Create a new array U*Ål // Push: Input * Input.slice(1).length() // Push: U¬ // Input, split into chars £tY // Map; At each char: .substr(Index) Uå+ // Push: Cumulative reduce Input; with addition xx // Sum all the items, twice [Try it online!][TIO-j66l38wo] [Japt]: https://github.com/ETHproductions/japt [TIO-j66l38wo]: https://tio.run/##y0osKPn/PzpU63BrjkLooTWHFpdEHm4OPbxUO7ai4v9/JUMjYxNTM3MlAA "Japt – Try It Online"