import java.util.*;
import java.io.*;

public class Main{
 public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 }
  
  
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
 public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 }
  
  
} Main public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 } main {
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str = s.nextLine(); str s.nextLine() s.nextLine s int k =0; k 0 for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
    if(str.charAt(i)=='0'){
    k++;
    }
   } {
    if(str.charAt(i)=='0'){
    k++;
    }
   } if(str.charAt(i)=='0'){
    k++;
    } str.charAt(i)=='0' str.charAt(i) str.charAt str i '0' {
    k++;
    } k++ k System.out.print(2*Math.min(k, (int)str.length()-k)) System.out.print System.out System System.out 2*Math.min(k, (int)str.length()-k) 2 Math.min(k, (int)str.length()-k) Math.min Math k (int)str.length()-k (int)str.length() str.length str k String[] args args public class Main{
 public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 }
  
  
} public class Main{
 public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 }
  
  
} Main
import java.util.*;
import java.io.*;

public class Main{
 public static void main(String[] args){
 Scanner s = new Scanner(System.in);
   String str = s.nextLine();
   int k =0;
   
   for(int i=0; i<str.length(); i++){
    if(str.charAt(i)=='0'){
    k++;
    }
   }
  System.out.print(2*Math.min(k, (int)str.length()-k));
   
 }
  
  
}