import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        System.out.println(min * 2);
    }
} 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 count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        System.out.println(min * 2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        System.out.println(min * 2);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        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 count0 = 0; count0 0 int count1 = 0; count1 0 for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        } char c s.toCharArray() s.toCharArray s {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        } {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        } if (c == '0') ++count0; c == '0' c '0' ++count0 count0 if (c == '1') ++count1; c == '1' c '1' ++count1 count1 int min = Math.min(count0, count1); min Math.min(count0, count1) Math.min Math count0 count1 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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        System.out.println(min * 2);
    }
} public class Main {

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

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;        
        int count1 = 0;
        for (char c : s.toCharArray()) {
            if (c == '0') ++count0;
            if (c == '1') ++count1;
        }
        
        int min = Math.min(count0, count1);
        System.out.println(min * 2);
    }
}
