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