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