
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) StringBuilder sb = new StringBuilder(in.next()); sb new StringBuilder(in.next()) int ans = 0; ans 0 for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < sb.length() - 1 i sb.length() - 1 sb.length() sb.length sb 1 i++ i++ i {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		} {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		} if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			} sb.charAt(i) == sb.charAt(i + 1) sb.charAt(i) sb.charAt sb i sb.charAt(i + 1) sb.charAt sb i + 1 i 1 {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			} sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0") sb.replace sb i + 1 i 1 i + 2 i 2 sb.charAt(i) == '0' ? "1" : "0" sb.charAt(i) == '0' sb.charAt(i) sb.charAt sb i '0' "1" "0" ans++ ans System.out.println(ans) System.out.println System.out System System.out ans in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		StringBuilder sb = new StringBuilder(in.next());
		int ans = 0;
		for (int i = 0; i < sb.length() - 1; i++) {
			if (sb.charAt(i) == sb.charAt(i + 1)) {
				sb.replace(i + 1, i + 2, sb.charAt(i) == '0' ? "1" : "0");
				ans++;
			}
		}
		System.out.println(ans);
		in.close();
	}
}