import math import sys import decimal def powerOfTen(n): st = str(n) if st[0] == '1' and st.count('1') == 1: return True return False N = int(input()) logn = math.log10(N) ans = math.ceil(math.log10(N)/2) if powerOfTen(N) and logn % 2 == 0: ans+=1 print(ans)