import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int sLen = S.length(); sLen S.length() S.length S int oneLen = S.replaceAll("0", "").length(); oneLen S.replaceAll("0", "").length() S.replaceAll("0", "").length S.replaceAll("0", "") S.replaceAll S "0" "" int zeroLen = sLen - oneLen; zeroLen sLen - oneLen sLen oneLen int r = Math.min(zeroLen, oneLen) * 2; r Math.min(zeroLen, oneLen) * 2 Math.min(zeroLen, oneLen) Math.min Math zeroLen oneLen 2 System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int sLen = S.length();
        int oneLen = S.replaceAll("0", "").length();
        int zeroLen = sLen - oneLen;
        int r = Math.min(zeroLen, oneLen) * 2;
        System.out.println(r);
    }
}