#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int g = 0;
  cin >> s;
  while (true) {
    int pos1 = s.find("01");
    int pos2 = s.find("10");
    if (pos1 > -1) {
      s.erase(pos1, 2);
      g += 2;
    } else if (pos2 > -1) {
      s.erase(pos2, 2);
      g += 2;
    } else
      break;
  }
  cout << g;
  return 0;
}
