#include <bits/stdc++.h>
using namespace std;
bool f = false;
int main() {
  string s;
  cin >> s;
  int ns, ng, ct = 0, fl = 0;
  ns = s.size();
  for (int i = 0; i < (ns); i++) {
    for (int j = 0; j < (s.size()); j++) {
      if (j == s.size() - 1)
        f = true;
      else if ((s.at(j) == '0' && s.at(j + 1) == '1') ||
               (s.at(j) == '1' && s.at(j + 1) == '0')) {
        ct += 2;
        string t = s.substr(0, j) + s.substr(j + 2);
        s = t;
        break;
      }
    }
    if (f == true) break;
  }
  cout << ct << endl;
}
