#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = 1 << 29;
int main() {
  string s;
  cin >> s;
  int i = 0;
  int cnt = 0;
  while (1) {
    if ((s[i] == '0' && s[i + 1] == '1') || (s[i] == '1' && s[i + 1] == '0')) {
      s.erase(s.begin() + i);
      s.erase(s.begin() + i);
      cnt += 2;
      i = 0;
      continue;
    }
    i++;
    if (s.size() == i) break;
  }
  cout << cnt << endl;
}
