import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    } main {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter ou = new PrintWriter(System.out); ou new PrintWriter(System.out) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc int a = 0; a 0 for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		} 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')a++;
		} {
			if(s.charAt(i) == '0')a++;
		} if(s.charAt(i) == '0')a++; s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' a++ a ou.print(2 * Math.min(a , s.length() - a) + "\n") ou.print ou 2 * Math.min(a , s.length() - a) + "\n" 2 * Math.min(a , s.length() - a) 2 Math.min(a , s.length() - a) Math.min Math a s.length() - a s.length() s.length s a "\n" ou.flush() ou.flush ou String[] args args public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    }
} public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    }
} Main
import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		int a = 0;
		for(int i = 0 ; i < s.length() ; i++){
			if(s.charAt(i) == '0')a++;
		}
		ou.print(2 * Math.min(a , s.length() - a) + "\n");
		ou.flush();
    }
}