import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count = 0; count 0 int count0 = 0; count0 0 int count1 = 0; count1 0 boolean test = true; test true for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        } 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'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        } {
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        } if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            } str.charAt(i)=='0' str.charAt(i) str.charAt str i '0' {
                count0++;
                //System.out.println(0+":"+count0);
            } count0++ count0 {
                count1++;
                //System.out.println(1+":"+count1);
            } count1++ count1 if(count0<count1){
            count = count0;
        }else{
            count = count1;
        } count0<count1 count0 count1 {
            count = count0;
        } count = count0 count count0 {
            count = count1;
        } count = count1 count count1 System.out.println(count*2) System.out.println System.out System System.out count*2 count 2 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        //int N = str.length();
        //char[] c = str.toCharArray();
        int count = 0;
        int count0 = 0;
        int count1 = 0;
        boolean test = true;
        
        //while(test && str.length()>1){
        for(int i=0; i<str.length(); i++){
            if(str.charAt(i)=='0'){
                count0++;
                //System.out.println(0+":"+count0);
            }else{
                count1++;
                //System.out.println(1+":"+count1);
            }
        }
        if(count0<count1){
            count = count0;
        }else{
            count = count1;
        }
        //}
        System.out.println(count*2);
    }
}