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