#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<char> s;
  char c;
  while (!cin.eof()) {
    cin >> c;
    if (std::cin.fail()) break;
    s.push_back(c);
  }
  int l = s.size();
  int num = 0;
  for (int i = 0; i < l; i++) {
    if ((s[i] == '0' && s[i + 1] == '1') || (s[i] == '1' && s[i + 1] == '0')) {
      s.erase(s.begin() + i, s.begin() + i + 1);
      num += 2;
      i -= 2;
    }
  }
  cout << num;
}
