import java.util.Scanner;
import java.util.ArrayList;

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

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] s = sc.next().split("");

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] s = sc.next().split("");

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String[] s = sc.next().split("");

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" int count_red  =0; count_red 0 int count_blue =0; count_blue 0 for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    } int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    } {
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    } if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      } s[i].equals("0") s[i].equals s[i] s i "0" {
        count_red += 1;
      } count_red += 1 count_red 1 if(s[i].equals("1")){
        count_blue += 1;
      } s[i].equals("1") s[i].equals s[i] s i "1" {
        count_blue += 1;
      } count_blue += 1 count_blue 1 int ans = Math.min(count_red,count_blue)*2; ans Math.min(count_red,count_blue)*2 Math.min(count_red,count_blue) Math.min Math count_red count_blue 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] s = sc.next().split("");

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] s = sc.next().split("");

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  }
} Main
import java.util.Scanner;
import java.util.ArrayList;

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

    int count_red  =0;
    int count_blue =0;

    for(int i=0; i<s.length; i++){
      if(s[i].equals("0")){
        count_red += 1;
      }else if(s[i].equals("1")){
        count_blue += 1;
      }
    }

    int ans = Math.min(count_red,count_blue)*2;

    System.out.println(ans);
  }
}