#include <bits/stdc++.h>
using namespace std;
string s;
bool remove() {
  bool find = false;
  long long start;
  if (s.size() == 0 || s.size() == 1) {
    return find;
  }
  for (long long i = 0; i < s.size() - 1; i++) {
    if (s[i] == '0' and s[i + 1] == '1') {
      find = true;
      start = i;
      break;
    } else if (s[i] == '1' and s[i + 1] == '0') {
      find = true;
      start = i;
      break;
    }
  }
  if (find == true) {
    s = s.substr(0, start) + s.substr(start + 2);
  }
  return find;
}
int main() {
  cin >> s;
  long long count = 0;
  while (1) {
    if (remove() == true) {
      count += 2;
    } else {
      break;
    }
  }
  cout << count << endl;
  return 0;
}
