import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	}
} Main public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	} main {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner int z = 0; z 0 int o = 0; o 0 for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    } {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    } if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        } S.charAt(i) == '0' S.charAt(i) S.charAt S i '0' {
	        	z++;
	        } z++ z {
	        	o++;
	        } o++ o int r = Math.min(z, o) * 2; r Math.min(z, o) * 2 Math.min(z, o) Math.min Math z o 2 System.out.print(r) System.out.print System.out System System.out r String[] args args public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	}
} public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
	    Scanner scanner = new Scanner(System.in);

	    String S = scanner.next();
	    int z = 0;
	    int o = 0;
	    for (int i = 0; i < S.length(); i++) {
	        if (S.charAt(i) == '0') {
	        	z++;
	        } else {
	        	o++;
	        }
	    }
	    
	    int r = Math.min(z, o) * 2;


        System.out.print(r);
	}
}