import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    }

} 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.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    }

} Main public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    } main {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int zeroCount = 0; zeroCount 0 int oneCount = 0; oneCount 0 char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        } char c chars {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        } {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        } if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            } c == '1' c '1' {
                oneCount++;
            } oneCount++ oneCount {
                zeroCount++;
            } zeroCount++ zeroCount int count = (Math.min(oneCount, zeroCount)) * 2; count (Math.min(oneCount, zeroCount)) * 2 (Math.min(oneCount, zeroCount)) Math.min Math oneCount zeroCount 2 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    }

} public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        
        int zeroCount = 0;
        int oneCount = 0;
        
        char[] chars = s.toCharArray();
        for (char c : chars) {
            if (c == '1') {
                oneCount++;
            } else {
                zeroCount++;
            }
        }
        int count = (Math.min(oneCount, zeroCount)) * 2;
        
        System.out.println(count);

    }

}