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 numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 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 numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 2);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] s = scanner.next().toCharArray();
    int numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 2);
  } main {
    Scanner scanner = new Scanner(System.in);

    char[] s = scanner.next().toCharArray();
    int numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 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 numZeros = 0; numZeros 0 for (char c : s) if (c == '0') numZeros++; char c s if (c == '0') numZeros++; if (c == '0') numZeros++; c == '0' c '0' numZeros++ numZeros System.out.println(Math.min(numZeros, s.length - numZeros) * 2) System.out.println System.out System System.out Math.min(numZeros, s.length - numZeros) * 2 Math.min(numZeros, s.length - numZeros) Math.min Math numZeros s.length - numZeros s.length s s.length numZeros 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 numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 2);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    char[] s = scanner.next().toCharArray();
    int numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 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 numZeros = 0;
    for (char c : s) if (c == '0') numZeros++;
    System.out.println(Math.min(numZeros, s.length - numZeros) * 2);
  }
}
