import java.util.*;

public class Main {

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

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    }
} import java.util.*; util.* java public class Main {

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

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        sc.close();

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        sc.close();

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int baseLength = S.length(); baseLength S.length() S.length S int zeroWord = baseLength - S.replaceAll("0", "").length(); zeroWord baseLength - S.replaceAll("0", "").length() baseLength S.replaceAll("0", "").length() S.replaceAll("0", "").length S.replaceAll("0", "") S.replaceAll S "0" "" int oneWord = baseLength - S.replaceAll("1", "").length(); oneWord baseLength - S.replaceAll("1", "").length() baseLength S.replaceAll("1", "").length() S.replaceAll("1", "").length S.replaceAll("1", "") S.replaceAll S "1" "" if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        } zeroWord > oneWord zeroWord oneWord {
            System.out.println(oneWord*2);
        } System.out.println(oneWord*2) System.out.println System.out System System.out oneWord*2 oneWord 2 {
            System.out.println(zeroWord*2);
        } System.out.println(zeroWord*2) System.out.println System.out System System.out zeroWord*2 zeroWord 2 String[] args args public class Main {

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

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    }
} public class Main {

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

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    }
} Main
import java.util.*;

public class Main {

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

        int baseLength = S.length();
        int zeroWord = baseLength - S.replaceAll("0", "").length();
        int oneWord = baseLength - S.replaceAll("1", "").length();

        if (zeroWord > oneWord) {
            System.out.println(oneWord*2);
        }
        else {
            System.out.println(zeroWord*2);
        }
    }
}