import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char[]c=scan.next().toCharArray(); c scan.next().toCharArray() scan.next().toCharArray scan.next() scan.next scan int num0=0; num0 0 int  num1=0; num1 0 for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		} int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		} {
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		} if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			} Character.getNumericValue(c[i])==0 Character.getNumericValue(c[i]) Character.getNumericValue Character c[i] c i 0 {
				num0++;
			} num0++ num0 {
				num1++;
			} num1++ num1 if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		} num0<num1 num0 num1 {
			System.out.println(2*num0);
		} System.out.println(2*num0) System.out.println System.out System System.out 2*num0 2 num0 {
			System.out.println(2*num1);
		} System.out.println(2*num1) System.out.println System.out System System.out 2*num1 2 num1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[]c=scan.next().toCharArray();
		int num0=0;
		int  num1=0;
		for(int i=0;i<c.length;i++){
			if(Character.getNumericValue(c[i])==0){
				num0++;
			}else{
				num1++;
			}
		}
		if(num0<num1){
			System.out.println(2*num0);
		}else{
			System.out.println(2*num1);
		}
	}
}