

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    }
} 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.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int res = 0; res 0 for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == '1') {
                res++;
            }
        } {
            if(s.charAt(i) == '1') {
                res++;
            }
        } if(s.charAt(i) == '1') {
                res++;
            } s.charAt(i) == '1' s.charAt(i) s.charAt s i '1' {
                res++;
            } res++ res res = Math.min(res, s.length()-res) res Math.min(res, s.length()-res) Math.min Math res s.length()-res s.length() s.length s res System.out.println(res*2) System.out.println System.out System System.out res*2 res 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    }
} Main


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int res = 0;
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '1') {
                res++;
            }
        }
        res = Math.min(res, s.length()-res);
        System.out.println(res*2);
    }
}
