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().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    }

} 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().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s = sc.next().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    } main {
        Scanner sc = new Scanner(System.in);
        String[] s = sc.next().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s = sc.next().split(""); s sc.next().split("") sc.next().split sc.next() sc.next sc "" List<String> sList = new ArrayList<>(Arrays.asList(s)); sList new ArrayList<>(Arrays.asList(s)) int zeroCount = 0; zeroCount 0 int oneCount = 0; oneCount 0 for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        } int i = 0; int i = 0; i 0 i < sList.size() i sList.size() sList.size sList i++ i++ i {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        } {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        } String target = sList.get(i); target sList.get(i) sList.get sList i if ("0".equals(target)) {
                zeroCount++;
                continue;
            } "0".equals(target) "0".equals "0" target {
                zeroCount++;
                continue;
            } zeroCount++ zeroCount continue; oneCount++ oneCount System.out.println(2 * Math.min(zeroCount, oneCount)) System.out.println System.out System System.out 2 * Math.min(zeroCount, oneCount) 2 Math.min(zeroCount, oneCount) Math.min Math zeroCount oneCount String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s = sc.next().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s = sc.next().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    }

} 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().split("");
        List<String> sList = new ArrayList<>(Arrays.asList(s));
        int zeroCount = 0;
        int oneCount = 0;
        for (int i = 0; i < sList.size(); i++) {
            String target = sList.get(i);
            if ("0".equals(target)) {
                zeroCount++;
                continue;
            }
            oneCount++;
        }
        System.out.println(2 * Math.min(zeroCount, oneCount));
    }

}
