#include <bits/stdc++.h>
using namespace std;
struct point {
  int x;
  int y;
};
int i, j, k, count1 = 0, count2 = 0;
int main() {
  string s;
  cin >> s;
  int ans = 0;
  for (i = 0; i < s.length() - 1;) {
    if ((s[i] == '0' && s[i + 1] == '1') || (s[i] == '1' && s[i + 1] == '0')) {
      s.erase(s.begin() + i);
      s.erase(s.begin() + i);
      i--;
      ans += 2;
    } else {
      i++;
    }
  }
  cout << ans << endl;
}
