import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines C = read().rstrip().decode() x = 0 for i in range(len(C) - 1): if C[i + 1] != '0': x += 1 print(x)