print((function (f, s) return f(s) end)(function (s) local r = 0 for e in s:gmatch("%d") do r=r+tonumber(e) end return r end, io.stdin:read("*l")))