import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    }
} Main public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int reds = 0; reds 0 int idx = 0; idx 0 while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        } idx < s.length() idx s.length() s.length s {
            if (s.charAt(idx++) == '0') reds++;
        } if (s.charAt(idx++) == '0') reds++; s.charAt(idx++) == '0' s.charAt(idx++) s.charAt s idx++ idx '0' reds++ reds System.out.println(Math.min(reds, s.length()-reds) * 2) System.out.println System.out System System.out Math.min(reds, s.length()-reds) * 2 Math.min(reds, s.length()-reds) Math.min Math reds s.length()-reds s.length() s.length s reds 2 String args[] args public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    }
} public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int reds = 0;
        int idx = 0;

        while (idx < s.length()) {
            if (s.charAt(idx++) == '0') reds++;
        }
        System.out.println(Math.min(reds, s.length()-reds) * 2);
    }
}