import java.util.*;

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = S.length();
        int count0 = 0;
        int count1 = 0;
        
        for(int i=0; i<N; i++){
            if(S.charAt(i) == '0'){
                count0++;
            }else{
                count1++;
            }
        }
        
        if(count0>count1){
            System.out.println(2*count1);
        }else{
            System.out.println(2*count0);
        }
        
   }
}
