import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  }
} Main public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  } main {
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  } Scanner sc =  new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc int c1 = 0 c1 0 c2 = 0; c2 0 for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    } {
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    } if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      } S.charAt(i) == '0' S.charAt(i) S.charAt S i '0' {
        c1++;
      } c1++ c1 {
        c2++;
      } c2++ c2 System.out.println(Math.min(c1,c2)*2) System.out.println System.out System System.out Math.min(c1,c2)*2 Math.min(c1,c2) Math.min Math c1 c2 2 String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  }
} Main
import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String S = sc.nextLine();
    int c1 = 0, c2 = 0;
    for(int i = 0; i < S.length(); i++){
      if(S.charAt(i) == '0'){
        c1++;
      }else{
        c2++;
      }
    }
    System.out.println(Math.min(c1,c2)*2);
  }
}