#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i = 0;
  int cnt = 0;
  while (i < s.size() - 1) {
    if (s[i] == '0' && s[i + 1] == '1') {
      cnt += 2;
      s = s.erase(i, 2);
      if (i != 0) i--;
    } else if (s[i] == '1' && s[i + 1] == '0') {
      cnt += 2;
      s = s.erase(i, 2);
      if (i != 0) i--;
    } else {
      i++;
    }
  }
  cout << cnt << endl;
  return 0;
}
