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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	} main {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int zerocnt = 0; zerocnt 0 int onecnt = 0; onecnt 0 int test = 0; test 0 ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split(""))); Stringlist new ArrayList<String>(Arrays.asList(S.split(""))) for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	} String i Stringlist {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	} {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	} if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		} "0".equals(i) "0".equals "0" i {
    			zerocnt++;
    		} zerocnt++ zerocnt {
    			onecnt++;
    		} onecnt++ onecnt System.out.println(Math.min(zerocnt, onecnt) * 2) System.out.println System.out System System.out Math.min(zerocnt, onecnt) * 2 Math.min(zerocnt, onecnt) Math.min Math zerocnt onecnt 2 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int zerocnt = 0;
        int onecnt = 0;
        int test = 0;
    	ArrayList<String> Stringlist = new ArrayList<String>(Arrays.asList(S.split("")));
    	for(String i : Stringlist) {
    		if("0".equals(i)) {
    			zerocnt++;
    		}else {
    			onecnt++;
    		}
    	}
        System.out.println(Math.min(zerocnt, onecnt) * 2);
	}
}
