import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.nextLine().toCharArray(); s sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc int a = 0; a 0 int b = 0; b 0 for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        } {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        } if (s[i] == '0') {
                a++;
            } else {
                b++;
            } s[i] == '0' s[i] s i '0' {
                a++;
            } a++ a {
                b++;
            } b++ b System.out.println(Math.min(a, b) * 2) System.out.println System.out System System.out Math.min(a, b) * 2 Math.min(a, b) Math.min Math a b 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                a++;
            } else {
                b++;
            }
        }
        System.out.println(Math.min(a, b) * 2);
    }
}