import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] line = scanner.nextLine().split("");
    
    int curr = Integer.parseInt(line[0]);
    int change = 0;
    for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    }
    System.out.println(change);
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] line = scanner.nextLine().split("");
    
    int curr = Integer.parseInt(line[0]);
    int change = 0;
    for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    }
    System.out.println(change);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] line = scanner.nextLine().split("");
    
    int curr = Integer.parseInt(line[0]);
    int change = 0;
    for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    }
    System.out.println(change);
  } main {
    Scanner scanner = new Scanner(System.in);
    String[] line = scanner.nextLine().split("");
    
    int curr = Integer.parseInt(line[0]);
    int change = 0;
    for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    }
    System.out.println(change);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] line = scanner.nextLine().split(""); line scanner.nextLine().split("") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner "" int curr = Integer.parseInt(line[0]); curr Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int change = 0; change 0 for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    } int i = 1; int i = 1; i 1 i < line.length i line.length line line.length i++ i++ i {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    } {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    } if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      } curr == Integer.parseInt(line[i]) curr Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      } curr = Integer.parseInt(line[i]) == 0 ? 1 : 0 curr Integer.parseInt(line[i]) == 0 ? 1 : 0 Integer.parseInt(line[i]) == 0 Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i 0 1 0 change++ change {
        curr = Integer.parseInt(line[i]);
      } curr = Integer.parseInt(line[i]) curr Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i System.out.println(change) System.out.println System.out System System.out change String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] line = scanner.nextLine().split("");
    
    int curr = Integer.parseInt(line[0]);
    int change = 0;
    for(int i = 1; i < line.length; i++) {
      if (curr == Integer.parseInt(line[i])) {
        curr = Integer.parseInt(line[i]) == 0 ? 1 : 0;
        change++;
      }
      else {
        curr = Integer.parseInt(line[i]);
      }
    }
    System.out.println(change);
  }
}