import java.util.*; 

class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        String s=sc.next();
   		String[] a=s.split("");
  		int ans=0;

		for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	}
  
    	System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        String s=sc.next();
   		String[] a=s.split("");
  		int ans=0;

		for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	}
  
    	System.out.println(ans);
    }
} Main public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        String s=sc.next();
   		String[] a=s.split("");
  		int ans=0;

		for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	}
  
    	System.out.println(ans);
    } main {
	Scanner sc=new Scanner(System.in);
        String s=sc.next();
   		String[] a=s.split("");
  		int ans=0;

		for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	}
  
    	System.out.println(ans);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc String[] a=s.split(""); a s.split("") s.split s "" int ans=0; ans 0 for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	} int c=0; int c=0; c 0 c<a.length-1 c a.length-1 a.length a a.length 1 c++ c++ c {
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	} {
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	} if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            } a[c].equals("0")&&a[c+1].equals("0") a[c].equals("0") a[c].equals a[c] a c "0" a[c+1].equals("0") a[c+1].equals a[c+1] a c+1 c 1 "0" {
              a[c+1]="1";
              ans++;
            } a[c+1]="1" a[c+1] a c+1 c 1 "1" ans++ ans if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            } a[c].equals("1")&&a[c+1].equals("1") a[c].equals("1") a[c].equals a[c] a c "1" a[c+1].equals("1") a[c+1].equals a[c+1] a c+1 c 1 "1" {
              a[c+1]="0";
              ans++;
            } a[c+1]="0" a[c+1] a c+1 c 1 "0" ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*; 

class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        String s=sc.next();
   		String[] a=s.split("");
  		int ans=0;

		for(int c=0;c<a.length-1;c++){
    		if(a[c].equals("0")&&a[c+1].equals("0")){
              a[c+1]="1";
              ans++;
            }else if(a[c].equals("1")&&a[c+1].equals("1")){
              a[c+1]="0";
              ans++;
            }
    	}
  
    	System.out.println(ans);
    }
}
