def main(): C = input() cList = list(C) ans = 0 for i in range(1,len(cList)): if C[i] != '0':ans +=1 print(ans) if __name__ == '__main__': main()