#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int ans = 0;
  while (s.size() > 0 && count(s.begin(), s.end(), s[0]) < s.size()) {
    for (int i = 0; i < s.size() - 1; ++i) {
      if ((s[i] == '0' && s[i + 1] == '1') ||
          (s[i] == '1' && s[i + 1] == '0')) {
        s.erase(i, 2);
        ans += 2;
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
