#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int N = S.size();
  int s[100010];
  for (int i = 0; i < N; i++) {
    if (S.at(i) == '0') s[i] = 0;
    if (S.at(i) == '1') s[i] = 1;
  }
  int sum_0 = 0, sum_1 = 0;
  for (int i = 0; i < N; i++) {
    if (s[i] = 0)
      sum_0++;
    else
      sum_1++;
  }
  cout << 2 * (min(sum_0, sum_1)) << endl;
}
