import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int result = 0; result 0 int one =  0; one 0 for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		} int i = 0 ; int i = 0 ; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		} {
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		} result = S.indexOf("1", i) result S.indexOf("1", i) S.indexOf S "1" i if(result != -1){
				one +=1;
				i = result;
			} result != -1 result -1 1 {
				one +=1;
				i = result;
			} one +=1 one 1 i = result i result int zero = S.length() - one; zero S.length() - one S.length() S.length S one if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		} one >= zero one zero {
			System.out.println(2 * zero);
		} System.out.println(2 * zero) System.out.println System.out System System.out 2 * zero 2 zero {
			System.out.println(2 * one);
		} System.out.println(2 * one) System.out.println System.out System System.out 2 * one 2 one String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int result = 0;
		int one =  0;

		for(int i = 0 ; i < S.length() ; i++){
			result = S.indexOf("1", i);
			if(result != -1){
				one +=1;
				i = result;
			}
		}

		int zero = S.length() - one;
		if(one >= zero){
			System.out.println(2 * zero);
		}else{
			System.out.println(2 * one);
		}

	}

}
