c = int(input()) cnt = 0 for i in c: if i == '0': cnt += 1 print(len(c)-1-cnt)