import java.util.*;

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

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