import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc char[] c = str.toCharArray(); c str.toCharArray() str.toCharArray str int zero = 0; zero 0 int one = 0; one 0 for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        } {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        } if (c[i] =='0') {
                zero++;
            } else {
                one++;
            } c[i] =='0' c[i] c i '0' {
                zero++;
            } zero++ zero {
                one++;
            } one++ one System.out.println(Math.min(zero, one) * 2) System.out.println System.out System System.out Math.min(zero, one) * 2 Math.min(zero, one) Math.min Math zero one 2 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] c = str.toCharArray();
        
        int zero = 0;
        int one = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] =='0') {
                zero++;
            } else {
                one++;
            }
        }
        
        System.out.println(Math.min(zero, one) * 2);
    }
}
