import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int b = 0;
	int r = 0;
	for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	}
	System.out.println((int)Math.min(b,r)*2);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int b = 0;
	int r = 0;
	for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	}
	System.out.println((int)Math.min(b,r)*2);
    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int b = 0;
	int r = 0;
	for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	}
	System.out.println((int)Math.min(b,r)*2);
    } main {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int b = 0;
	int r = 0;
	for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	}
	System.out.println((int)Math.min(b,r)*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int b = 0; b 0 int r = 0; r 0 for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	} int i = 0; int i = 0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	} {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	} char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c=='0') b++;
	    else r++; c=='0' c '0' b++ b r++ r System.out.println((int)Math.min(b,r)*2) System.out.println System.out System System.out (int)Math.min(b,r)*2 (int)Math.min(b,r) Math.min Math b r 2 String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int b = 0;
	int r = 0;
	for(int i = 0; i<s.length();i++) {
	    char c = s.charAt(i);
	    if(c=='0') b++;
	    else r++;
	}
	System.out.println((int)Math.min(b,r)*2);
    }
}