#Bash + GNU utilities, 32 <!-- language-all: lang-bash --> rev|fold -1|nl -s*|paste -sd+|bc Input read from STDIN. [Try it online][1]. ###Explanation rev # reverse digits |fold -1 # split each digit onto its own line |nl -s* # prefix line numbers; separate with "*" operator |paste -sd+ # join lines onto one line, separated with "+" operator |bc # arithmetically evaluate [1]: https://tio.run/##S0oszvj/vyi1rCYtPydFQdewJi9HQbdYq6YgsbgkFchK0a5JSv7/39TY3NAMAA