#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  S = 'S' + S + 'E';
  int ans = 0;
  while (true) {
    int b_flag = true;
    for (int i = 0; i < S.length() - 1; i++) {
      if ((S[i] == '0' & S[i + 1] == '1') | (S[i] == '1' & S[i + 1] == '0')) {
        S.erase(i, 2);
        ans += 2;
        b_flag = false;
        break;
      }
    }
    if (b_flag) break;
  }
  cout << ans << endl;
  return 0;
}
