import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	}
} Main public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	} main {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	} int N N K; K String S; S Scanner sc=new Scanner(System.in); sc new Scanner(System.in) S=sc.next() S sc.next() sc.next sc char c[]=S.toCharArray(); c S.toCharArray() S.toCharArray S int num=0; num 0 N=c.length N c.length c c.length for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			} {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			} if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					} i+1<=N-1 i+1 i 1 N-1 N 1 {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					} if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					} c[i]=='0'&&c[i+1]=='0' c[i]=='0' c[i] c i '0' c[i+1]=='0' c[i+1] c i+1 i 1 '0' {
						c[i+1]='1';
						num++;
						
						
					} c[i+1]='1' c[i+1] c i+1 i 1 '1' num++ num if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					} c[i]=='1'&&c[i+1]=='1' c[i]=='1' c[i] c i '1' c[i+1]=='1' c[i+1] c i+1 i 1 '1' {
						c[i+1]='0';
						num++;
					} c[i+1]='0' c[i+1] c i+1 i 1 '0' num++ num System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {

	public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	}
} public class Main {

	public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int N,K;
		String S;
		Scanner sc=new Scanner(System.in);	
		S=sc.next();
		char c[]=S.toCharArray();
		int num=0;
		N=c.length;
		for(int i=0;i<N;i++) {
				
					if(i+1<=N-1) {
						if(c[i]=='0'&&c[i+1]=='0') {
						c[i+1]='1';
						num++;
						
						
					}else if(c[i]=='1'&&c[i+1]=='1'){
						c[i+1]='0';
						num++;
					}
					}
					
					
			}
			
		
			
		System.out.println(num);
	}
}
