import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	} main {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char s[] =  scan.next().toCharArray(); s scan.next().toCharArray() scan.next().toCharArray scan.next() scan.next scan int zeroCount = 0; zeroCount 0 int oneCount = 0; oneCount 0 for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		} {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		} if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			} s[i] == '0' s[i] s i '0' {
				zeroCount++;
			} zeroCount++ zeroCount {
				oneCount++;
			} oneCount++ oneCount System.out.println(2 * Math.min(zeroCount, oneCount)) System.out.println System.out System System.out 2 * Math.min(zeroCount, oneCount) 2 Math.min(zeroCount, oneCount) Math.min Math zeroCount oneCount String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		char s[] =  scan.next().toCharArray();
		int zeroCount = 0;
		int oneCount = 0;

		for(int i = 0; i < s.length; i++) {
			if(s[i] == '0') {
				zeroCount++;
			}else {
				oneCount++;
			}
		}
		
		System.out.println(2 * Math.min(zeroCount, oneCount));
		
	}
}