import java.util.*;
class Main {
  public static void main(String[] args){
    System.out.println(Tile());
  }
  public static int Tile() {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();
    	if(str.length() == 1) return 0;
  
    String tmp = str.substring(0,1);
    int result = 0;
    for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    }
    return result;
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args){
    System.out.println(Tile());
  }
  public static int Tile() {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();
    	if(str.length() == 1) return 0;
  
    String tmp = str.substring(0,1);
    int result = 0;
    for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    }
    return result;
  }
} Main public static void main(String[] args){
    System.out.println(Tile());
  } main {
    System.out.println(Tile());
  } System.out.println(Tile()) System.out.println System.out System System.out Tile() Tile String[] args args public static int Tile() {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();
    	if(str.length() == 1) return 0;
  
    String tmp = str.substring(0,1);
    int result = 0;
    for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    }
    return result;
  } Tile {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();
    	if(str.length() == 1) return 0;
  
    String tmp = str.substring(0,1);
    int result = 0;
    for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    }
    return result;
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner if(str.length() == 1) return 0; str.length() == 1 str.length() str.length str 1 return 0; 0 String tmp = str.substring(0,1); tmp str.substring(0,1) str.substring str 0 1 int result = 0; result 0 for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    } int i= 1; int i= 1; i 1 i < str.length() i str.length() str.length str i++ i++ i {
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    } {
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    } if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        } tmp.equals(str.substring(i, i+1)) tmp.equals tmp str.substring(i, i+1) str.substring str i i+1 i 1 {
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        } result++ result tmp = tmp.equals("0") ? "1" : "0" tmp tmp.equals("0") ? "1" : "0" tmp.equals("0") tmp.equals tmp "0" "1" "0" {
        	tmp = str.substring(i, i+1);
        } tmp = str.substring(i, i+1) tmp str.substring(i, i+1) str.substring str i i+1 i 1 return result; result
import java.util.*;
class Main {
  public static void main(String[] args){
    System.out.println(Tile());
  }
  public static int Tile() {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();
    	if(str.length() == 1) return 0;
  
    String tmp = str.substring(0,1);
    int result = 0;
    for(int i= 1; i < str.length(); i++){
    	if(tmp.equals(str.substring(i, i+1))){
        	result++;
            tmp = tmp.equals("0") ? "1" : "0";
        }else{
        	tmp = str.substring(i, i+1);
        }
    }
    return result;
  }
}