s = open('number.in').read().strip()
isValid = lambda (a, b) : not b.startswith('0') and a and b and int(a) <= int(b)
ans = sum(1 for i in filter(isValid, [(s[:i], s[i:]) for i in range(1, len(s) // 2 + 1)]))
open('number.out', 'w').write('%d\n'%ans)
