import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  }
} Main public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  } main {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  } try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    } {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String tmp = line; tmp line int zero = 0; zero 0 int one = 0; one 0 for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      } int i = 0; int i = 0; i 0 i < tmp.length() i tmp.length() tmp.length tmp i++ i++ i {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      } {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      } if(tmp.charAt(i) == '0') {
          zero++;
        } tmp.charAt(i) == '0' tmp.charAt(i) tmp.charAt tmp i '0' {
          zero++;
        } zero++ zero if(tmp.charAt(i) == '1') {
          one++;
        } tmp.charAt(i) == '1' tmp.charAt(i) tmp.charAt tmp i '1' {
          one++;
        } one++ one System.out.println(2 * Math.min(zero, one)) System.out.println System.out System System.out 2 * Math.min(zero, one) 2 Math.min(zero, one) Math.min Math zero one String[] args args public class Main {
  public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  }
} public class Main {
  public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    // 入力
    try (Scanner sc = new Scanner(System.in);) {
      String line = sc.nextLine();
      String tmp = line;
      int zero = 0;
      int one = 0;
      for (int i = 0; i < tmp.length(); i++) {
        if(tmp.charAt(i) == '0') {
          zero++;
        }
        if(tmp.charAt(i) == '1') {
          one++;
        }
      }
      System.out.println(2 * Math.min(zero, one));
    }
  }
}