import java.util.*;

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

public class Main
{
	public static void main(String[] args)
    {
      	Scanner in = new Scanner(System.in);
      	String s = in.next();
      	int zer = 0, one = 0, len = s.length();
      	for (int i = 0; i < len; i++)
        	if (s.charAt(i) == '0')
            	zer++;
     	one = len-zer;
      	System.out.println(2*(int)(Math.min(zer, one)));
      	in.close();
    }
}