#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int removed_cubes = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (s[i + 1] == '1') {
        s.erase(s.begin() + i, s.begin() + i + 2);
        removed_cubes += 2;
        i = -1;
        n -= 2;
      }
    } else {
      if (s[i + 1] == '0') {
        s.erase(s.begin() + i, s.begin() + i + 2);
        removed_cubes += 2;
        i = -1;
        n -= 2;
      }
    }
  }
  cout << removed_cubes << '\n';
  return 0;
}
