import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    }
} import java.util.*; util.* java public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    } main {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc List<Character> zero = new ArrayList<>(); zero new ArrayList<>() List<Character> one = new ArrayList<>(); one new ArrayList<>() for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	} char c S.toCharArray() S.toCharArray S {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	} {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	} if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		} c == '0' c '0' {
    			zero.add(c);
    		} zero.add(c) zero.add zero c {
    			one.add(c);
    		} one.add(c) one.add one c System.out.println(2*Math.min(zero.size(), one.size())) System.out.println System.out System System.out 2*Math.min(zero.size(), one.size()) 2 Math.min(zero.size(), one.size()) Math.min Math zero.size() zero.size zero one.size() one.size one String[] args args public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    }
} public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    }
} Main
import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String S = sc.next();
    	List<Character> zero = new ArrayList<>();
    	List<Character> one = new ArrayList<>();
    	for (char c : S.toCharArray()) {
    		if (c == '0') {
    			zero.add(c);
    		} else {
    			one.add(c);
    		}
    	}
    	System.out.println(2*Math.min(zero.size(), one.size()));
    }
}