import java.awt.*;
import java.util.*;

public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    }
} import java.awt.*; awt.* java import java.util.*; util.* java public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    }
} Main public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    } main {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.next(); str s.next() s.next s char[] arr=str.toCharArray(); arr str.toCharArray() str.toCharArray str char[] arr1=new char[100000]; arr1 new char[100000] 100000 if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        } arr[0]=='0' arr[0] arr 0 '0' {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        } for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i+=2 i+=2 i 2 {
                arr1[i]='0';
                arr1[i+1]='1';
            } {
                arr1[i]='0';
                arr1[i+1]='1';
            } arr1[i]='0' arr1[i] arr1 i '0' arr1[i+1]='1' arr1[i+1] arr1 i+1 i 1 '1' if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        } arr[0]=='1' arr[0] arr 0 '1' {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        } for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i+=2 i+=2 i 2 {
                arr1[i]='1';
                arr1[i+1]='0';
            } {
                arr1[i]='1';
                arr1[i+1]='0';
            } arr1[i]='1' arr1[i] arr1 i '1' arr1[i+1]='0' arr1[i+1] arr1 i+1 i 1 '0' int count=0; count 0 for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
            if(arr[i]!=arr1[i])
                count++;
        } {
            if(arr[i]!=arr1[i])
                count++;
        } if(arr[i]!=arr1[i])
                count++; arr[i]!=arr1[i] arr[i] arr i arr1[i] arr1 i count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    }
} public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    }
} Main
import java.awt.*;
import java.util.*;

public class Main {
    public static void main(String args[])
    {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr=str.toCharArray();
        char[] arr1=new char[100000];
        if(arr[0]=='0') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='0';
                arr1[i+1]='1';
            }
        }
        if(arr[0]=='1') {
            for (int i = 0; i < str.length(); i+=2) {
                arr1[i]='1';
                arr1[i+1]='0';
            }
        }
        int count=0;
        for(int i=0;i<str.length();i++)
        {
            if(arr[i]!=arr1[i])
                count++;
        }
        System.out.println(count);

    }
}
