c = str(input()) d = '' for i in c: if i != '0': d = d + i print(len(d)-1)