#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int i, cnt = 0;
  while (1) {
    int f = 0;
    for (i = 0; i < S.size(); i++) {
      if ((S[i] == '0' && S[i + 1] == '1') ||
          (S[i] == '1' && S[i + 1] == '0')) {
        S.erase(i, 2);
        cnt += 2;
        f++;
        break;
      }
    }
    if (f == 0) break;
  }
  cout << cnt << endl;
}
