c = input() counter = 0 for i in range(len(c)-1): if c[i+1] != '0': counter += 1 print(counter)