import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*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 red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*2);
        
    }
        
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*2);
        
    } main {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*2);
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str=sc.next(); str sc.next() sc.next sc int red; red int blue; blue red=str.length()-str.replaceAll("1", "").length() red str.length()-str.replaceAll("1", "").length() str.length() str.length str str.replaceAll("1", "").length() str.replaceAll("1", "").length str.replaceAll("1", "") str.replaceAll str "1" "" blue=str.length()-str.replaceAll("0", "").length() blue str.length()-str.replaceAll("0", "").length() str.length() str.length str str.replaceAll("0", "").length() str.replaceAll("0", "").length str.replaceAll("0", "") str.replaceAll str "0" "" System.out.println(Math.min(red,blue)*2) System.out.println System.out System System.out Math.min(red,blue)*2 Math.min(red,blue) Math.min Math red blue 2 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*2);
        
    }
        
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*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 red;
        int blue;
        red=str.length()-str.replaceAll("1", "").length();
        blue=str.length()-str.replaceAll("0", "").length();
        System.out.println(Math.min(red,blue)*2);
        
    }
        
}