#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  bool flg1 = true, flg2 = true;
  while (flg1 || flg2) {
    int l = s.find("10");
    if (l == string::npos)
      flg1 = false;
    else {
      s.erase(l, 2);
      cnt++;
    }
    int r = s.find("01");
    if (r == string::npos)
      flg2 = false;
    else {
      s.erase(r, 2);
      cnt++;
    }
  }
  cout << cnt * 2 << endl;
}
