#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int result;
  bool found;
  size_t f;
  while (1) {
    found = false;
    f = s.find("01");
    if (f != string::npos) {
      s.erase(s.begin() + f, s.begin() + f + 2);
      ++result;
      found = true;
    }
    f = s.find("10");
    if (f != string::npos) {
      s.erase(s.begin() + f, s.begin() + f + 2);
      ++result;
      found = true;
    }
    if (!found) {
      break;
    }
  }
  cout << result * 2 << endl;
}
