

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc List<String> sList = Arrays.asList(S.split("")); sList Arrays.asList(S.split("")) Arrays.asList Arrays S.split("") S.split S "" int zeroCount = 0; zeroCount 0 int oneCount= 0; oneCount 0 int ans = 0; ans 0 for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		} String s sList {
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		} {
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		} if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			} s.equals("0") s.equals s "0" {
				zeroCount++;
			} zeroCount++ zeroCount {
				oneCount++;
			} oneCount++ oneCount if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		} zeroCount>oneCount zeroCount oneCount {
			ans = oneCount*2;
		} ans = oneCount*2 ans oneCount*2 oneCount 2 {
			ans = zeroCount*2;
		} ans = zeroCount*2 ans zeroCount*2 zeroCount 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	}
} public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	}
} Main


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		List<String> sList = Arrays.asList(S.split(""));

		int zeroCount = 0;
		int oneCount= 0;
		int ans = 0;
		for(String s : sList){
			if(s.equals("0")){
				zeroCount++;
			}else{
				oneCount++;
			}
		}

		if(zeroCount>oneCount){
			ans = oneCount*2;
		}else{
			ans = zeroCount*2;
		}

		System.out.println(ans);

	}
}
