import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}

} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int v[] = new int[s.length()]; v new int[s.length()] s.length() s.length s for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			v[i] = Integer.parseInt(s.substring(i,i+1));
		} {
			v[i] = Integer.parseInt(s.substring(i,i+1));
		} v[i] = Integer.parseInt(s.substring(i,i+1)) v[i] v i Integer.parseInt(s.substring(i,i+1)) Integer.parseInt Integer s.substring(i,i+1) s.substring s i i+1 i 1 int ans=0; ans 0 for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		} int i=1; int i=1; i 1 i<v.length i v.length v v.length i++ i++ i {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		} {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		} if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			} v[i] == v[i-1] v[i] v i v[i-1] v i-1 i 1 {
				v[i] = (v[i]+1)%2;
				ans++;
			} v[i] = (v[i]+1)%2 v[i] v i (v[i]+1)%2 (v[i]+1) v[i] v i 1 2 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}

} public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int v[] = new int[s.length()];
		for(int i=0; i<s.length(); i++){
			v[i] = Integer.parseInt(s.substring(i,i+1));
		}
		int ans=0;
		for(int i=1; i<v.length; i++) {
			if(v[i] == v[i-1]) {
				v[i] = (v[i]+1)%2;
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}

}
