import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		
		int zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-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 zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-one));
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		
		int zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-one));
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		
		int zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-one));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int zero = 0; zero 0 int one = 0; one 0 for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		} char c s.toCharArray() s.toCharArray s {
			if(c == '0')
				zero++;
			else
				one++;
		} {
			if(c == '0')
				zero++;
			else
				one++;
		} if(c == '0')
				zero++;
			else
				one++; c == '0' c '0' zero++ zero one++ one System.out.println(zero+one - Math.abs(zero-one)) System.out.println System.out System System.out zero+one - Math.abs(zero-one) zero+one zero one Math.abs(zero-one) Math.abs Math zero-one zero one String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		
		int zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-one));
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		
		int zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-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 zero = 0;
		int one = 0;
		for(char c : s.toCharArray()) {
			if(c == '0')
				zero++;
			else
				one++;
		}
		System.out.println(zero+one - Math.abs(zero-one));
	}
}