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