import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    }
} import java.util.ArrayList; ArrayList java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.Map; Map java.util 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.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    } main {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc ArrayList<Character> c = new ArrayList<>(); c new ArrayList<>() int a=0 a 0 b=0; b 0 for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		} int i=0 ; int i=0 ; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			c.add(s.charAt(i));
		} {
			c.add(s.charAt(i));
		} c.add(s.charAt(i)) c.add c s.charAt(i) s.charAt s i for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		} int i=0 ; int i=0 ; i 0 i<c.size() i c.size() c.size c ++i ++i i {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		} {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		} if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			} c.get(i) == '0' c.get(i) c.get c i '0' {
				a++;
			} a++ a {
				b++;
			} b++ b if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		} a>=b a b {
			System.out.println(b*2);
		} System.out.println(b*2) System.out.println System.out System System.out b*2 b 2 {
			System.out.println(a*2);
		} System.out.println(a*2) System.out.println System.out System System.out a*2 a 2 String[] args args public class Main {

	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    }
} public class Main {

	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    }
} Main
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		ArrayList<Character> c = new ArrayList<>();
		int a=0,b=0;
		for(int i=0 ; i<s.length(); i++) {
			c.add(s.charAt(i));
		}
		for(int i=0 ; i<c.size() ; ++i) {
			if(c.get(i) == '0') {
				a++;
			}else {
				b++;
			}
		}
		if(a>=b) {
			System.out.println(b*2);
		}else {
			System.out.println(a*2);
		}
    }
}
