import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

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

		String S = sc.next();
		int N = S.length();
		int a = 0,b = 0;
		for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		}
		System.out.println(Math.min(a,b)*2);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int N = S.length();
		int a = 0,b = 0;
		for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		}
		System.out.println(Math.min(a,b)*2);
	} main {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int N = S.length();
		int a = 0,b = 0;
		for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		}
		System.out.println(Math.min(a,b)*2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int N = S.length(); N S.length() S.length S int a = 0 a 0 b = 0; b 0 for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		} {
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		} if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			} S.charAt(i)=='0' S.charAt(i) S.charAt S i '0' {
				a++;
			} a++ a {
				b++;
			} b++ b System.out.println(Math.min(a,b)*2) System.out.println System.out System System.out Math.min(a,b)*2 Math.min(a,b) Math.min Math a b 2 String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		int N = S.length();
		int a = 0,b = 0;
		for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		}
		System.out.println(Math.min(a,b)*2);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

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

		String S = sc.next();
		int N = S.length();
		int a = 0,b = 0;
		for( int i=0; i<N; i++ ){
			if( S.charAt(i)=='0' ){
				a++;
			}else{
				b++;
			}
		}
		System.out.println(Math.min(a,b)*2);
	}
}
