import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  }
} Main public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  } main {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String Tile = sc.next(); Tile sc.next() sc.next sc char Tiles[]= new char[Tile.length()]; Tiles new char[Tile.length()] Tile.length() Tile.length Tile int count=0; count 0 for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    } int i=0; int i=0; i 0 i<Tile.length() i Tile.length() Tile.length Tile i++ i++ i {
       Tiles[i]=Tile.charAt(i);
    } {
       Tiles[i]=Tile.charAt(i);
    } Tiles[i]=Tile.charAt(i) Tiles[i] Tiles i Tile.charAt(i) Tile.charAt Tile i for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    } int i=1; int i=1; i 1 i<Tile.length() i Tile.length() Tile.length Tile i++ i++ i {
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    } {
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    } if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	} Tiles[i]==Tiles[i-1] Tiles[i] Tiles i Tiles[i-1] Tiles i-1 i 1 {
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	} count++ count if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         } Tiles[i]=='0' Tiles[i] Tiles i '0' {
         Tiles[i]='1';
         } Tiles[i]='1' Tiles[i] Tiles i '1' if (Tiles[i]=='1'){
         Tiles[i]='0';
         } Tiles[i]=='1' Tiles[i] Tiles i '1' {
         Tiles[i]='0';
         } Tiles[i]='0' Tiles[i] Tiles i '0' System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  }
} public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String Tile = sc.next();
    char Tiles[]= new char[Tile.length()];
    int count=0;
    for(int i=0;i<Tile.length();i++){
       Tiles[i]=Tile.charAt(i);
    }
    for(int i=1;i<Tile.length();i++){
         if(Tiles[i]==Tiles[i-1]){
           count++;
         if(Tiles[i]=='0'){
         Tiles[i]='1';
         }else if (Tiles[i]=='1'){
         Tiles[i]='0';
         }
    	}
    }
      System.out.print(count); 
  }
}