import java.util.*;

public class Main {
    public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    }

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    }
} import java.util.*; util.* java public class Main {
    public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    }

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    }
} Main public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    } main {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    } char s[] = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int o = 0; o 0 int l = 0; l 0 for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        } {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        } if (s[i] == '0') {
                o++;
            } else {
                l++;
            } s[i] == '0' s[i] s i '0' {
                o++;
            } o++ o {
                l++;
            } l++ l System.out.println(Math.min(o, l) * 2) System.out.println System.out System System.out Math.min(o, l) * 2 Math.min(o, l) Math.min Math o l 2 Scanner sc sc public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    } try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        } catch (Exception e) {
            throw e;
        } Exception e {
            throw e;
        } throw e; e {
            new Main().main(sc);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) new Main().main(sc) new Main().main new Main() sc String[] args args public class Main {
    public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    }

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    }
} public class Main {
    public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    }

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    }
} Main
import java.util.*;

public class Main {
    public void main(Scanner sc) {
        char s[] = sc.next().toCharArray();
        int o = 0;
        int l = 0;

        for (int i = 0; i < s.length; i++) {
            if (s[i] == '0') {
                o++;
            } else {
                l++;
            }
        }

        System.out.println(Math.min(o, l) * 2);
    }

    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            new Main().main(sc);
        } catch (Exception e) {
            throw e;
        }
    }
}
