c=input() s=[i for i in c if i!='0'] print(len(s)-1)