import java.util.*;

public class Main 
{
	    public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	}
} import java.util.*; util.* java public class Main 
{
	    public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	}
} Main public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	} main {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner Long countA = 0L; countA 0L Long countB = 0L; countB 0L for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	} 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')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	} {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	} if(S.charAt(i) == '0')
                  	countA++; S.charAt(i) == '0' S.charAt(i) S.charAt S i '0' countA++ countA if(S.charAt(i) == '1') 
                  	countB++; S.charAt(i) == '1' S.charAt(i) S.charAt S i '1' countB++ countB countA = Math.min(countA, countB) * 2 countA Math.min(countA, countB) * 2 Math.min(countA, countB) Math.min Math countA countB 2 System.out.println(countA) System.out.println System.out System System.out countA String[] args args public class Main 
{
	    public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	}
} public class Main 
{
	    public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	}
} Main
import java.util.*;

public class Main 
{
	    public static void main(String[] args) 
        {
        	Scanner scanner = new Scanner(System.in);
        	String S = scanner.next();
        	Long countA = 0L;
        	Long countB = 0L;
        	for (int i = 0; i < S.length(); i++) 
            {
            	if(S.charAt(i) == '0')
                  	countA++;
            	if(S.charAt(i) == '1') 
                  	countB++;
        	}
        	countA = Math.min(countA, countB) * 2;
        	System.out.println(countA);
    	}
}
