import java.util.*;

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

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