import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String[] Sarray = S.split(""); Sarray S.split("") S.split S "" int num0 = 0; num0 0 int num1 = 0; num1 0 int answer = 0; answer 0 for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		} {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		} if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1; Sarray[i].equals("0") Sarray[i].equals Sarray[i] Sarray i "0" num0 += 1 num0 1 num1 += 1 num1 1 if(num0 < num1) answer = num0*2;
		else answer = num1*2; num0 < num1 num0 num1 answer = num0*2 answer num0*2 num0 2 answer = num1*2 answer num1*2 num1 2 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] Sarray = S.split("");
		int num0 = 0;
		int num1 = 0;
		int answer = 0;
		for(int i = 0; i < S.length(); i++) {
			if(Sarray[i].equals("0")) num0 += 1;
			else num1 += 1;
		}
		if(num0 < num1) answer = num0*2;
		else answer = num1*2;
		System.out.println(answer);
		}

}
