import java.util.Scanner;

public class Main {
	public static boolean[] array;
	public static int count = 0;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	}
	
	public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static boolean[] array;
	public static int count = 0;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	}
	
	public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	}
} Main public static boolean[] array; array public static int count = 0; count 0 public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc array = new boolean[str.length()] array new boolean[str.length()] str.length() str.length str for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length ++i ++i i {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		} {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		} if (str.charAt(i) == '1') {
				array[i] = true;
			} str.charAt(i) == '1' str.charAt(i) str.charAt str i '1' {
				array[i] = true;
			} array[i] = true array[i] array i true exec(0) exec 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	} exec {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	} if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		} index >= array.length - 1 index array.length - 1 array.length array array.length 1 {
			return;
		} return; if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		} array[index] == array[++index] array[index] array index array[++index] array ++index index {
			array[index] = !array[index];
			count++;
		} array[index] = !array[index] array[index] array index !array[index] array[index] array index count++ count exec(index) exec index int index index public class Main {
	public static boolean[] array;
	public static int count = 0;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	}
	
	public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	}
} public class Main {
	public static boolean[] array;
	public static int count = 0;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	}
	
	public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	}
} Main
import java.util.Scanner;

public class Main {
	public static boolean[] array;
	public static int count = 0;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		array = new boolean[str.length()];
		for (int i = 0; i < array.length; ++i) {
			if (str.charAt(i) == '1') {
				array[i] = true;
			}
		}
		exec(0);
		System.out.println(count);
	}
	
	public static void exec(int index) {
		if (index >= array.length - 1) {
			return;
		} else if (array[index] == array[++index]) {
			array[index] = !array[index];
			count++;
		}
		exec(index);
	}
}
