import java.util.*;


public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    }
} 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 count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    } main {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count_0 = 0; count_0 0 int count_1 = 0; count_1 0 for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        } {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        } char chr = str.charAt(i); chr str.charAt(i) str.charAt str i if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            } chr == '0' chr '0' {
                count_0++;
            } count_0++ count_0 {
                count_1++;
            } count_1++ count_1 int answer = Math.min(count_0, count_1) * 2; answer Math.min(count_0, count_1) * 2 Math.min(count_0, count_1) Math.min Math count_0 count_1 2 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int count_0 = 0;
        int count_1 = 0;
        
        for (int i = 0; i < str.length(); i++) {
            char chr = str.charAt(i);
            
            if (chr == '0') {
                count_0++;
            } else {
                count_1++;
            }
        }
        
        int answer = Math.min(count_0, count_1) * 2;
        System.out.println(answer);
    }
}