import java.util.Scanner;
import java.util.Arrays;
import java.util.stream.Stream;
import java.util.stream.IntStream;
import java.lang.StringBuilder;

public class Main {
  public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.stream.Stream; Stream java.util.stream import java.util.stream.IntStream; IntStream java.util.stream import java.lang.StringBuilder; StringBuilder java.lang public class Main {
  public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  }
} Main public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  } main {
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String N = sc.next(); N sc.next() sc.next sc int[] cubes = new int[2]; cubes new int[2] 2 cubes[0] = 0 cubes[0] cubes 0 0 cubes[1] = 0 cubes[1] cubes 1 0 for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    } int i = 0; int i = 0; i 0 i < N.length() i N.length() N.length N i++ i++ i {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    } {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    } int tmp =(int)(  N.charAt(i) - '0' ); tmp (int)(  N.charAt(i) - '0' ) N.charAt(i) N.charAt N i '0' cubes[tmp] += 1 cubes[tmp] cubes tmp 1 System.out.println(Math.min(cubes[0], cubes[1]) * 2) System.out.println System.out System System.out Math.min(cubes[0], cubes[1]) * 2 Math.min(cubes[0], cubes[1]) Math.min Math cubes[0] cubes 0 cubes[1] cubes 1 2 String[] args args public class Main {
  public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  }
} public class Main {
  public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  }
} Main
import java.util.Scanner;
import java.util.Arrays;
import java.util.stream.Stream;
import java.util.stream.IntStream;
import java.lang.StringBuilder;

public class Main {
  public static void main(String[] args ){
    Scanner sc = new Scanner(System.in);


    String N = sc.next();
    int[] cubes = new int[2];
    cubes[0] = 0;
    cubes[1] = 0;
    for(int i = 0; i < N.length(); i++) {
      int tmp =(int)(  N.charAt(i) - '0' );
      cubes[tmp] += 1;
    }

    System.out.println(Math.min(cubes[0], cubes[1]) * 2);
  }
}
