#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int count = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    int flag = 0;
    for (int j = s.size() - 1; j >= 1; j--) {
      if ((s[j] == '0' && s[j - 1] == '1') ||
          (s[j] == '1' && s[j - 1] == '0')) {
        count += 2;
        flag = 1;
        s.erase(s.begin() + j);
        s.erase(s.begin() + j - 1);
        j--;
      }
    }
    if (flag == 0) {
      break;
    }
  }
  cout << count << endl;
  return 0;
}
