c = input() ans = 0 for s in c[1:]: if(s!='0'): ans += 1 print(ans)