#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  int ans = 0;
  for (;;) {
    bool f = false;
    for (int i = 0; i < s.length() - 1; ++i) {
      if (s[i] == '0' && s[i + 1] == '1' || s[i] == '1' && s[i + 1] == '0') {
        s.erase(i, 2);
        ans += 2;
        f = true;
        break;
      }
    }
    if (!f || s.length() == 0) {
      break;
    }
  }
  cout << ans;
  return 0;
}
