a = str('1000000007') a = a.count('0') d = input() d = str(d) d = d.count('0') print(int(a-d))