import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in int countZero = 0; countZero 0 for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      if(s.charAt(i)=='0')
        countZero++;
    } {
      if(s.charAt(i)=='0')
        countZero++;
    } if(s.charAt(i)=='0')
        countZero++; s.charAt(i)=='0' s.charAt(i) s.charAt s i '0' countZero++ countZero System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2) System.out.println System.out System System.out countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2 countZero<s.length()-countZero countZero s.length()-countZero s.length() s.length s countZero countZero*2 countZero 2 (s.length()-countZero)*2 (s.length()-countZero) s.length() s.length s countZero 2 String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int countZero = 0;
    for(int i=0; i<s.length(); i++) {
      if(s.charAt(i)=='0')
        countZero++;
    }
    System.out.println(countZero<s.length()-countZero?countZero*2:(s.length()-countZero)*2);
  }
}