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

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} 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 {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} Main private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    } solve {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[] chars = S.toCharArray(); chars S.toCharArray() S.toCharArray S int zeroNum = 0; zeroNum 0 int oneNum = 0; oneNum 0 for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        } char ch chars {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        } {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        } if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            } ch == '0' ch '0' {
                zeroNum++;
            } zeroNum++ zeroNum {
                oneNum++;
            } oneNum++ oneNum int min = Math.min(zeroNum, oneNum); min Math.min(zeroNum, oneNum) Math.min Math zeroNum oneNum int ans = min * 2; ans min * 2 min 2 System.out.print(ans) System.out.print System.out System System.out ans // Main
    public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

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

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[] chars = S.toCharArray();
        int zeroNum = 0;
        int oneNum = 0;
        for (char ch : chars) {
            if (ch == '0') {
                zeroNum++;
            }
            else {
                oneNum++;
            }
        }
        int min = Math.min(zeroNum, oneNum);
        int ans = min * 2;
        System.out.print(ans);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

}