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