
import java.util.Scanner;

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    }
    
} import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    }
    
} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    } main {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.next(); str s.next() s.next s int changes = 0; changes 0 char[] cs = {str.charAt(0), '0'}; cs {str.charAt(0), '0'} str.charAt(0) str.charAt str 0 '0' if (cs[0] == '0')
            cs[1] = '1'; cs[0] == '0' cs[0] cs 0 '0' cs[1] = '1' cs[1] cs 1 '1' for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i ++ i ++ i {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        } {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        } if (str.charAt(i) != cs[i % 2])
                changes ++; str.charAt(i) != cs[i % 2] str.charAt(i) str.charAt str i cs[i % 2] cs i % 2 i 2 changes ++ changes System.out.println(changes) System.out.println System.out System System.out changes String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    }
    
} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    }
    
} Main

import java.util.Scanner;

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner s = new Scanner(System.in);
        String str = s.next();
        int changes = 0;
        
        char[] cs = {str.charAt(0), '0'};
        if (cs[0] == '0')
            cs[1] = '1';
        
        for (int i = 0; i < str.length(); i ++) {
            if (str.charAt(i) != cs[i % 2])
                changes ++;
                
        }
        
        System.out.println(changes);
        
    }
    
}
