import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	} main {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	} Scanner sc  = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int count = 0; count 0 for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			count += (int)S.charAt(i) % 48;
		} {
			count += (int)S.charAt(i) % 48;
		} count += (int)S.charAt(i) % 48 count (int)S.charAt(i) % 48 (int)S.charAt(i) S.charAt S i 48 if(S.length() - count < count) {
			count = S.length() - count;
		} S.length() - count < count S.length() - count S.length() S.length S count count {
			count = S.length() - count;
		} count = S.length() - count count S.length() - count S.length() S.length S count System.out.println(count*2) System.out.println System.out System System.out count*2 count 2 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc  = new Scanner(System.in);
		String S = sc.next();
		int count = 0;
		for(int i = 0; i < S.length(); i++) {
			count += (int)S.charAt(i) % 48;
		}
		
		if(S.length() - count < count) {
			count = S.length() - count;
		}
		System.out.println(count*2);
		sc.close();
	}
}
