n = int(input()) l = len(str(n)) zero = str(n).count('0') print(l-1-zero)