local s = io.stdin:read("*l") local r = 0 s:gsub(".", function (e) r = r + tonumber(e) end) print(r)