c = input() n = len(c) res = 0 for i in range(1, n): c1 = c[:i] c2 = c[i:] if c2[0] == '0': continue res += 1 print(res)