import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<String> list= new ArrayList<String>(Arrays.asList(s.split(""))); list new ArrayList<String>(Arrays.asList(s.split(""))) int zero = 0; zero 0 int one = 0; one 0 for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		} int i=0; int i=0; i 0 list.size()>i list.size() list.size list i i++ i++ i {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		} {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		} if(list.get(i).equals("0"))
				zero++;
			else
				one++; list.get(i).equals("0") list.get(i).equals list.get(i) list.get list i "0" zero++ zero one++ one if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2); zero>=one zero one System.out.println(one*2) System.out.println System.out System System.out one*2 one 2 System.out.println(zero*2) System.out.println System.out System System.out zero*2 zero 2 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//Long[] array = new Long[6];
		String s = sc.next();
		List<String> list= new ArrayList<String>(Arrays.asList(s.split("")));
		int zero = 0;
		int one = 0;
		for(int i=0;list.size()>i;i++) {
			if(list.get(i).equals("0"))
				zero++;
			else
				one++;
		}
		if(zero>=one)
			System.out.println(one*2);
		else
			System.out.println(zero*2);
	}
}