#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> f(s.length());
  int count = 0;
  int tmp = 100;
  while (count - tmp != 0) {
    tmp = count;
    for (int i = 0; i < f.size(); i++) {
      if (f[i] == 1) continue;
      for (int j = i + 1; j < f.size(); j++) {
        if (f[j] == 1) continue;
        if ((s[i] == '1' && s[j] == '0') || (s[i] == '0' && s[j] == '1')) {
          f[i] = 1;
          f[j] = 1;
          count++;
        }
      }
    }
  }
  cout << count * 2 << endl;
  return 0;
}
