import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] C = sc.next().toCharArray(); C sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc char before = '0'; before '0' int answer = 0; answer 0 for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        } int i = 0; int i = 0; i 0 i < C.length i C.length C C.length i++ i++ i {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        } {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        } if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            } i == 0 i 0 {
                before = C[i];
            } before = C[i] before C[i] C i if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            } before == '0' && before == C[i] before == '0' before '0' before == C[i] before C[i] C i {
                answer++;
                before = '1';
            } answer++ answer before = '1' before '1' if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            } before == '1' && before == C[i] before == '1' before '1' before == C[i] before C[i] C i {
                answer++;
                before = '0';
            } answer++ answer before = '0' before '0' {
                before = C[i];
            } before = C[i] before C[i] C i System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] C = sc.next().toCharArray();
        char before = '0';
        int answer = 0;

        for (int i = 0; i < C.length; i++) {
            if (i == 0) {
                before = C[i];
            } else if (before == '0' && before == C[i]) {
                answer++;
                before = '1';
            } else if (before == '1' && before == C[i]) {
                answer++;
                before = '0';
            } else {
                before = C[i];
            }
        }
        System.out.println(answer);
        sc.close();
    }
}