import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  } main {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) char[] S = in.nextLine().toCharArray(); S in.nextLine().toCharArray() in.nextLine().toCharArray in.nextLine() in.nextLine in int zero = 0 zero 0 one = 0; one 0 for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    } char ch S {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    } {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    } if (ch == '0') {
        zero++;
      } else {
        one++;
      } ch == '0' ch '0' {
        zero++;
      } zero++ zero {
        one++;
      } one++ one System.out.println(Math.min(zero, one) * 2) System.out.println System.out System System.out Math.min(zero, one) * 2 Math.min(zero, one) Math.min Math zero one 2 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  }
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    char[] S = in.nextLine().toCharArray();
    int zero = 0, one = 0;
    for (char ch : S) {
      if (ch == '0') {
        zero++;
      } else {
        one++;
      }
    }
    System.out.println(Math.min(zero, one) * 2);
  }
}