set I0, 0
AGAIN:
        readline S0, 0
        length I1, S0
        le I1, 0, MAINLOOP
        set I1, S0
        add I0, I1
        branch AGAIN

MAINLOOP:
        print I0
        print "\n"
        end