#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int ans = 0;
  bool ch = true;
  while (ch) {
    bool co = true;
    for (int i = 0; i < str.size() - 1; i++) {
      if (str[i] == '0' && str[i + 1] == '1' ||
          str[i] == '1' && str[i + 1] == '0') {
        str.erase(i, 2);
        ans += 2;
        co = false;
        break;
      }
    }
    if (co || str.size() == 0) {
      ch = false;
    }
  }
  cout << ans << endl;
}
