C = input() zero = C.count("0") print(len(C)-1-zero)