import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  } main {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner int c0 = 0; c0 0 int c1 = 0; c1 0 for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    } char c S {
      if (c == '0') c0++;
      else c1++;
    } {
      if (c == '0') c0++;
      else c1++;
    } if (c == '0') c0++;
      else c1++; c == '0' c '0' c0++ c0 c1++ c1 System.out.println(Math.min(c0, c1) * 2) System.out.println System.out System System.out Math.min(c0, c1) * 2 Math.min(c0, c1) Math.min Math c0 c1 2 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    char[] S = scanner.next().toCharArray();
    int c0 = 0;
    int c1 = 0;
    for (char c : S) {
      if (c == '0') c0++;
      else c1++;
    }
    System.out.println(Math.min(c0, c1) * 2);
  }
}
