dc, 2323 22 bytes
1r[dk*K1-d0<a]dsax_1*+pd0<a]dsax_1*+
Try it onlineTry it online or verify 0-125!
1r[dk*K1-d0<a]dsax_1*+pd0<a]dsax_1*+ # input on stack, eg: 4
1 # push 1: 1 4
r # reverse top two: 4 1
[dk*K1-d0<a] # push [string]: [string] 4 1
dsa # copy top to register a: [string] 4 1
x # exec top* 0 24
_1 # push -1: -1 0 24
* # multiply: 0 24
+ # add: 24
p # print top element
# first exec of [string]:
[dk*K1-d0<a] # stack: 4 1
d # duplicate top: 4 4 1
k # pop & set precision: 4 1
* # multiply 4
K # push precision 4 4
1 # push 1 1 4 4
- # subtract 3 4
d0<a # if top > 0 exec content of register a, namely [string]
# output on stack: 24