import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  } main {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n0 = 0; n0 0 int n1 = 0; n1 0 for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    } 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') {
        n0++;
      } else {
        n1++;
      }
    } {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    } if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      } s.charAt(i) == '0' s.charAt(i) s.charAt s i '0' {
        n0++;
      } n0++ n0 {
        n1++;
      } n1++ n1 System.out.println(2 * Math.min(n0, n1)) System.out.println System.out System System.out 2 * Math.min(n0, n1) 2 Math.min(n0, n1) Math.min Math n0 n1 String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String s = sc.next();
    int n0 = 0;
    int n1 = 0;

    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '0') {
        n0++;
      } else {
        n1++;
      }
    }

    System.out.println(2 * Math.min(n0, n1));

  }
}