#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string str("01");
  string str2("10");
  bool flg;
  int cnt = 0;
  do {
    int wk = s.find(str);
    flg = wk != string::npos;
    if (flg) {
      s.erase(wk, 2);
      cnt++;
    }
  } while (flg);
  do {
    int wk = s.find(str2);
    flg = wk != string::npos;
    if (flg) {
      s.erase(wk, 2);
      cnt++;
    }
  } while (flg);
  cout << cnt * 2 << endl;
  return 0;
}
