import java.util.*;

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

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zeroCnt = 0;
        int oneCnt = 0;
        int min = 0;
        for(int i = 0;i <S.length();i++){
            if(S.charAt(i) == '0'){
                zeroCnt++;
            }
        }
        oneCnt = S.length()-zeroCnt;
        min = Math.min(zeroCnt,oneCnt);
        System.out.println(min*2);
    }
}
