import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    } main {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s int numChanges = 0; numChanges 0 for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        } int i = 0; int i = 0; i 0 i < chars.length - 1 i chars.length - 1 chars.length chars chars.length 1 i++ i++ i {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        } {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        } if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            } chars[i] == chars[i + 1] chars[i] chars i chars[i + 1] chars i + 1 i 1 {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            } chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0') chars[i + 1] chars i + 1 i 1 (char)(1 - (chars[i + 1] - '0') + '0') 1 - (chars[i + 1] - '0') 1 (chars[i + 1] - '0') chars[i + 1] chars i + 1 i 1 '0' '0' numChanges++ numChanges System.out.println(numChanges) System.out.println System.out System System.out numChanges String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        char[] chars = s.toCharArray();
        int numChanges = 0;

        for (int i = 0; i < chars.length - 1; i++) {
            if (chars[i] == chars[i + 1]) {
                chars[i + 1] = (char)(1 - (chars[i + 1] - '0') + '0');
                numChanges++;
            }
        }

        System.out.println(numChanges);

    }
}
