import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] ch = sc.nextLine().toCharArray(); ch sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc int count = 0; count 0 for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        } int i=0; int i=0; i 0 i<ch.length-1 i ch.length-1 ch.length ch ch.length 1 i++ i++ i {
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        } {
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        } if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            } ch[i]==ch[i+1] ch[i] ch i ch[i+1] ch i+1 i 1 {
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            } ch[i+1] = (ch[i]=='0')?'1':'0' ch[i+1] ch i+1 i 1 (ch[i]=='0')?'1':'0' (ch[i]=='0') ch[i] ch i '0' '1' '0' 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] ch = sc.nextLine().toCharArray();
        
        int count = 0;
        
        for(int i=0;i<ch.length-1;i++){
            if(ch[i]==ch[i+1]){
                ch[i+1] = (ch[i]=='0')?'1':'0';
                count++;
            }
        }
        
        System.out.println(count);
    }
}
