s = io.read() r = 0 for i = 2, #s do if s:sub(i, i) ~= "0" then r = r + 1 end end print(r)