import java.util.*;
public class Main{
public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
}
} import java.util.*; util.* java public class Main{
public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
}
} Main public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
} main {	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
} Scanner scanner = new Scanner (System.in); scanner new Scanner (System.in) String a = scanner.next(); a scanner.next() scanner.next scanner String b = ""; b "" if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    } a.charAt(0) == 48 a.charAt(0) a.charAt a 0 48 {
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    } for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      } int i = 0; int i = 0; i 0 i < a.length()/2 + 1 i a.length()/2 + 1 a.length()/2 a.length() a.length a 2 1 i++ i++ i {
        b = b + "01";
      } {
        b = b + "01";
      } b = b + "01" b b + "01" b "01" {
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    } for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      } int i = 0; int i = 0; i 0 i < a.length()/2+1 i a.length()/2+1 a.length()/2 a.length() a.length a 2 1 i++ i++ i {
        b = b + "10";
      } {
        b = b + "10";
      } b = b + "10" b b + "10" b "10" int counter = 0; counter 0 for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    } int i = 0; int i = 0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
      if (a.charAt(i) != b.charAt(i))
        counter++;
    } {
      if (a.charAt(i) != b.charAt(i))
        counter++;
    } if (a.charAt(i) != b.charAt(i))
        counter++; a.charAt(i) != b.charAt(i) a.charAt(i) a.charAt a i b.charAt(i) b.charAt b i counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String [] args args public class Main{
public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
}
} public class Main{
public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
}
} Main
import java.util.*;
public class Main{
public static void main (String [] args){	
Scanner scanner = new Scanner (System.in); 
    String a = scanner.next();
    String b = "";
    if (a.charAt(0) == 48){
      for (int i = 0; i < a.length()/2 + 1; i++){
        b = b + "01";
      }
    }
    else{
      for (int i = 0; i < a.length()/2+1; i++){
        b = b + "10";
      }
    }
    int counter = 0;
    for (int i = 0; i < a.length(); i++){
      if (a.charAt(i) != b.charAt(i))
        counter++;
    }
    System.out.println(counter);
}
}