#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0, pos;
  bool flag = true;
  string s;
  cin >> s;
  list<bool> li;
  list<bool>::iterator itr;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      li.push_back(false);
    } else {
      li.push_back(true);
    }
  }
  while (flag) {
    flag = false;
    for (itr = li.begin(); next(itr) != li.end();) {
      if (*itr && !*next(itr) || !*itr && *next(itr)) {
        cnt += 2;
        flag = true;
        itr = li.erase(itr);
        itr = li.erase(itr);
        continue;
      }
      itr++;
    }
  }
  cout << cnt << endl;
  return 0;
}
