In the city of Saint Petersburg, a day lasts for $2^{100}$ minutes. From the main station of Saint Petersburg, a train departs after $1$ minute, $4$ minutes, $16$ minutes, and so on; in other words, the train departs at time $4^k$ for each integer $k \geq 0$. Team BowWow has arrived at the station at the time $s$ and it is trying to count how many trains have they missed; in other words, the number of trains that have departed strictly before time $s$. For example if $s = 20$, then they missed trains which have departed at $1$, $4$ and $16$. As you are the only one who knows the time, help them!

Note that the number $s$ will be given you in a binary representation without leading zeroes.


-----Input-----

The first line contains a single binary number $s$ ($0 \leq s < 2^{100}$) without leading zeroes.


-----Output-----

Output a single number — the number of trains which have departed strictly before the time $s$.


-----Examples-----
Input
100000000

Output
4

Input
101

Output
2

Input
10100

Output
3



-----Note-----

In the first example $100000000_2 = 256_{10}$, missed trains have departed at $1$, $4$, $16$ and $64$.

In the second example $101_2 = 5_{10}$, trains have departed at $1$ and $4$.

The third example is explained in the statements.

Difficulty: interview

Starter code:

Solutions:
s = int(input(), 2)

t, ans = 1, 0

while t < s:
	ans += 1
	t *= 4

print(ans)


a = int(input(), base = 2)

c = 0
while 4**c < a: c += 1
print(c)


def mp():
    return map(int, input().split())

n = int(input(), 2)
ans = 0
i = 1
while i < n:
    i *= 4
    ans += 1

print(ans)

from sys import stdin
s = stdin.readline().strip()
ans = 0
t = '1'
while len(t) < len(s) or (len(t) == len(s) and t < s):
    ans += 1
    t += '00'
print(ans)



import sys 
from collections import defaultdict
input = lambda : sys.stdin.readline().rstrip()

n = int(input(), 2)

ans = 0

i = 0
while 4**i < n:
  ans += 1
  i += 1

print(ans)

i, k = 0, int(input(), 2)
while 4 ** i < k:
	i += 1
print(i)

def main():
    import sys
    input = sys.stdin.readline
    
    s = input()
    cnt = s.count('1')
    l = len(s) - 1
    
    if l & 1:
        if cnt > 1:
            print(l + 1 >> 1)
        else:
            print(l >> 1)
    else:
        print(l >> 1)
    
    return 0

main()

import itertools
import math
from collections import defaultdict

def input_ints():
    return list(map(int, input().split()))

def solve():
    x = int(input(), 2)
    ans = 0
    p = 1
    while p < x:
        ans += 1
        p *= 4
    print(ans)


def __starting_point():
    solve()

__starting_point()

# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!
# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!
# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!
from sys import stdin, stdout
import math
import copy
 
#T = int(input())
#N = int(input())
s = input()
#print(N)
#N,r = [int(x) for x in stdin.readline().split()]
#arr = [int(x) for x in stdin.readline().split()]
 
N = int(s, 2)

res = 0
T = 1
while T<N:
    res += 1
    T *= 4
    
print(res)

s = int(input(), 2)

count = 0
i = 0
while True:
    if 4**i >= s:
        break
    count += 1
    i += 1
print(count)


s = int(input(), base=2)
#print(s)
k = 0
ans = 0
while 4 ** k < s:
    ans += 1
    k += 1
print(ans)

from sys import stdin

a = int(stdin.readline(), 2)
b = 1
count = 0
while b < a:
    b *= 4
    count += 1
print(count)



s = input()
ans = len(s) - 1
k = 0
for i in s:
    k += int(i)
if k > 1:
    ans += 1
if ans % 2 != 0:
    ans += 1

print(ans // 2)

num_s = input()
num = 0

for digit in num_s:
    num *= 2

    if digit == '1':
        num += 1

cnt = 0
cur = 1

while cur < num:
    cur *= 4
    cnt += 1

print(cnt)


k=input()
n=int(k, base = 2)

pw = 0
s = 0
r = 1
while r < n:
    s += 1
    r *= 4
print(s)

n = int(input(), 2)
ans = 0
t = 1

while t < n:
    ans += 1
    t *= 4

print(ans)

x = int(input(), 2)
ans = 0
curr = 1
while curr < x:
	curr *= 4
	ans += 1
print(ans)

n = int(input(), 2)
t = 1
ans = 0

for i in range(101):
  if t < n:
    ans += 1
  t *= 4

print(ans)

s = int(input(), 2)
ans = 0
k = 1
while k<s:
	ans+=1
	k*=4

print(ans)


s = input()
ans = (len(s) + 1) // 2
if len(s) % 2 == 1 and s[1:] == '0' * (len(s) - 1):
    ans -= 1
print(ans)


s = input()
ans = (len(s) - 1) // 2
add = False
for i in range(1, len(s)):
  if s[i] == '1':
    add = True
if add or len(s) % 2 == 0:
  ans += 1
print(ans)


a = int(input(), 2)
s = 1
ans = 0
while s < a:
    ans+= 1
    s *= 4
print(ans)

s = int(input())
ans = 0
t = 1
while t<s:
    ans += 1
    t*=100
print(ans)

n = int(input(), 2)
a = [1]
for i in range(200):
  a.append(a[-1] * 4)
for i in range(200):
  if a[i] >= n:
    print(i)
    break