import java.util.*;
import static java.lang.Math.*;

public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    }
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        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 if(s.length() == 1){
            System.out.println("0");
            return;
        } s.length() == 1 s.length() s.length s 1 {
            System.out.println("0");
            return;
        } System.out.println("0") System.out.println System.out System System.out "0" return; int s_0 = s.replaceAll("1","").length(); s_0 s.replaceAll("1","").length() s.replaceAll("1","").length s.replaceAll("1","") s.replaceAll s "1" "" int s_1 = s.length() - s_0; s_1 s.length() - s_0 s.length() s.length s s_0 int min = min(s_0, s_1); min min(s_0, s_1) min s_0 s_1 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();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    }
} public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    }
} Main
import java.util.*;
import static java.lang.Math.*;

public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if(s.length() == 1){
            System.out.println("0");
            return;
        }

        int s_0 = s.replaceAll("1","").length();
        int s_1 = s.length() - s_0;

        int min = min(s_0, s_1);
        System.out.println(min*2);
    }
}