#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int a = 0;
  int b = 0;
  for (int i = 0; i < n; i++) {
    if (s.at(i) == '0')
      a++;
    else
      b++;
  }
  int m = n;
  int r = 0;
  while (a > 0 && b > 0) {
    string t = s;
    int m = t.size();
    for (int i = 0; i < m - 1; i++) {
      if (t.at(i) != t.at(i + 1)) {
        r += 2;
        s.erase(s.begin() + i, s.begin() + i + 1);
        a--;
        b--;
        break;
      }
    }
  }
  cout << r << endl;
}
