c = input() c = c.replace("0", "") print(len(c)-1)