import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   } main {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int one=0; one 0 int zero=0; zero 0 for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        } 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'){
                zero++;
            }else{
                one++;
            }
        } {
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        } if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            } s.charAt(i)=='0' s.charAt(i) s.charAt s i '0' {
                zero++;
            } zero++ zero {
                one++;
            } one++ one if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        } zero<one zero one {
            System.out.println(zero*2);
        } System.out.println(zero*2) System.out.println System.out System System.out zero*2 zero 2 {
            System.out.println(one*2);
        } System.out.println(one*2) System.out.println System.out System System.out one*2 one 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        int one=0;
        int zero=0;
        
        for(int i=0; i<s.length(); i++){
            if(s.charAt(i)=='0'){
                zero++;
            }else{
                one++;
            }
        }
        
        if(zero<one){
            System.out.println(zero*2);
        }else{
            System.out.println(one*2);
        }
   }
}
