import java.util.*;

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

public class Main {
    public static void main(String[] args) throws Exception {
    
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int cnt0 = 0;
        int cnt1 = 0;
        for(int i = 0; i < S.length(); i++){
            if( S.charAt(i) == '0' ){
                cnt0++;
            } else {
                cnt1++;
            }
        }
        
        System.out.println( Math.min(cnt0, cnt1) * 2 );
        
    }
}
