local s = io.read("*l")

local count = 0
count = count + ((s:sub(1, 1) == "1") and 1 or 0)
count = count + ((s:sub(2, 2) == "1") and 1 or 0)
count = count + ((s:sub(3, 3) == "1") and 1 or 0)
print(count)