#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int i = 0;
  int count = 0;
  bool flag;
  do {
    flag = false;
    for (i = 0; i < S.length(); ++i) {
      if (((int)S.find("01") != -1) || ((int)S.find("10") != -1)) {
        S.erase(S.begin() + i);
        S.erase(S.begin() + i);
        count++;
        flag = true;
      }
    }
  } while (flag);
  cout << count * 2 << endl;
  return 0;
}
