import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int c0 = 0; c0 0 int c1 = 0; c1 0 for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        } char c s {
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        } {
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        } if(c == '0'){
                c0++;
            }else{
                c1++;
            } c == '0' c '0' {
                c0++;
            } c0++ c0 {
                c1++;
            } c1++ c1 System.out.println(2*Math.min(c0,c1)) System.out.println System.out System System.out 2*Math.min(c0,c1) 2 Math.min(c0,c1) Math.min Math c0 c1 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int c0 = 0;
        int c1 = 0;
        for(char c : s){
            if(c == '0'){
                c0++;
            }else{
                c1++;
            }
        }
        System.out.println(2*Math.min(c0,c1));
    }
}
