import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    } main {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count0 = 0; count0 0 int count1 = 0; count1 0 for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        } {
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        } if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            } s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' {
            	count0++;
            } count0++ count0 {
            	count1++;
            } count1++ count1 int ans = Math.min(count0, count1); ans Math.min(count0, count1) Math.min Math count0 count1 System.out.println(ans * 2) System.out.println System.out System System.out ans * 2 ans 2 String[] args args public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    }
} public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    }
} Main
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count0 = 0;
        int count1 = 0;
        for(int i = 0; i < s.length(); i++){
        	if(s.charAt(i) == '0'){
            	count0++;
            }else{
            	count1++;
            }
        }
        int ans = Math.min(count0, count1);
        System.out.println(ans * 2);
    }
}