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 ≥ 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](https://en.wikipedia.org/wiki/Binary_number#Representation) without leading zeroes.

Input

The first line contains a single binary number s (0 ≤ 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.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
    private static final FastReader scanner = new FastReader();
    public static void main(String[] args) {
        char[] c = scanner.next().toCharArray();
        if(c.length%2==0){
            System.out.println(c.length/2);
            return;
        }
        int count = 0;
        for(int i = 1 ; i<c.length;i++){
            if(c[i]=='1'){
                count++;
            }
        }
        if(count>0){
            count = 1;
        }
        System.out.println(c.length/2 + count);
    }
    private static String Sort(String s){
        char[] c  = s.toCharArray();
        Arrays.sort(c);
        return new String(c);
    }
    private static long ceildiv(long x,long y){
        return (x+y-1)/y;
    }
    private static void swap(int[] array , int a ,int b){
        if (a==b){
            return;
        }
        int temp = array[a];
        array[a] =array[b];
        array[b] =temp;
    }
    private static String revString(String str){
        StringBuilder sb = new StringBuilder(str);
        sb.reverse();
        return sb.toString();
    }
    private static int fibo(int n){
        int[] dp = new int[n];
        for(int i= 0 ;i<n;i++){
            if(i<2){
                dp[i] = 1;
            }else{
                dp[i] =dp[i-1]+dp[i-2];
            }
        }
        return dp[dp.length-1];
    }
    private static void swap(char[] array , int a,int b){
        if(a==b){
            return;
        }
        char temp = array[a];
        array[a] = array[b];
        array[b] = temp;
    }
    private static int max(int[] array ){
        int min = Integer.MIN_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]>min){
                min = array[i];
            }
        }
        return min;
    }
    private static int min(int[] array ){
        int min = Integer.MAX_VALUE;
        for(int i = 0;i< array.length;i++){
            if(array[i]<min){
                min = array[i];
            }
        }
        return min;
    }
    private static void readArray(int[] array){
        for(int i = 0;i< array.length;i++){
            array[i] = scanner.nextInt();
        }
    }
    private static int gcd(int a , int b){
        if(b==0) return  a;
        else return gcd(b,a%b);
    }
    private static long fact(int n){
        if(n==1 || n==0) return 1;
        else return (long) n*fact(n-1);
    }
    private static int Arraysum(int[] array){
        int sum = 0;
        for(int i = 0 ;i< array.length;i++){
            sum+=array[i];
        }
        return sum;
    }
    private static boolean isPrime(long n){
        if(n==1){
            return false;
        }
        for(long i = 2;i<=Math.sqrt(n);i++){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
    private static int multiply(int[] array){
        int mult = 1 ;
        for(int i = 0 ;i< array.length;i++) {
            mult *= array[i];
        }
        return mult;
    }
    private static int FromStringtoInt(String s){
        s = s.replaceAll("[^0-9]","");
        return Integer.parseInt(s);
    }
    static class BIT{
        static int[] BitTree = new int[1000];
        int sum(int index){
            int s =0;
//            index+=1;
            while (index>0){
                s+=BitTree[index];
                index-=(index&-index);
            }
            return s;
        }
        public static void updateBIT(int n, int index, int val) {
            index = index + 1;
            while(index <= n) {
                BitTree[index] += val;
                index += index & (-index);
            }
        }
        void constructBITree(int arr[], int n) {
            for(int i=1; i<=n; i++)
                BitTree[i] = 0;
            for(int i = 0; i < n; i++)
                updateBIT(n, i, arr[i]);
        }
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    private static int[] threeNumberSort(int[] array,int[] order){
        int f  = order[0];
        int s  = order[1];
        int t  = order[2];
        //
        int first = 0;
        int second = 0;
        int third = array.length-1;
        while(second<=third){
            int value = array[second];
            if(value == f){
                swap(array,first,second);
                first++;
                second++;
            }else if(value==t){
                swap(array,second,third);
                third--;
                // no action on second value
            }else if(value==s){
                second++;
            }
        }
        return array;
    }
}