#include <bits/stdc++.h>
using namespace std;
int main() {
  int c;
  string s;
  cin >> s;
  int n = s.length();
  while (true) {
    int i;
    n = s.length();
    for (i = 0; i < n - 1; i++) {
      if ((s[i] == '0' && s[i + 1] == '1') ||
          (s[i] == '1' && s[i + 1] == '0')) {
        c += 2;
        s = s.substr(0, i) + s.substr(i + 2, n - i - 2);
        break;
      }
    }
    if (n == 0 || i == n - 1) break;
  }
  cout << c << endl;
}
