import java.util.Scanner;
public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String qube = scan.next(); qube scan.next() scan.next scan char[] mozi = qube.toCharArray(); mozi qube.toCharArray() qube.toCharArray qube int count0 = 0; count0 0 int count1 = 0; count1 0 for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		} int i=0; int i=0; i 0 i<qube.length() i qube.length() qube.length qube i++ i++ i {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		} {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		} if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		} mozi[i] == '0' mozi[i] mozi i '0' {
			count0++;
		} count0++ count0 {
			count1++;
		} count1++ count1 System.out.println(Math.min(count0, count1)*2) System.out.println System.out System System.out Math.min(count0, count1)*2 Math.min(count0, count1) Math.min Math count0 count1 2 scan.close() scan.close scan String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	}

} public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	}

} Main
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String qube = scan.next();
		char[] mozi = qube.toCharArray();

		int count0 = 0;
		int count1 = 0;

		for(int i=0;i<qube.length();i++) {
		if(mozi[i] == '0') {
			count0++;
		}else {
			count1++;
		}
		}

		System.out.println(Math.min(count0, count1)*2);
		scan.close();

	}

}
