#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int c = 0;
  int p;
  string s;
  cin >> s;
  while (1) {
    if ((p = s.find("01")) >= 0) {
      s.erase(p, 2);
      c += 2;
    } else if ((p = s.find("10")) >= 0) {
      s.erase(p, 2);
      c += 2;
    } else {
      break;
    }
  }
  cout << c << endl;
  return 0;
}
