#include <bits/stdc++.h>
using namespace std;
vector<int> cube;
int main() {
  int i, k, len;
  char S[100000 + 1];
  cin >> S;
  for (i = 0; S[i] != '\0'; i++) {
    if (S[i] == '0')
      cube.push_back(1);
    else
      cube.push_back(-1);
  }
  len = i;
  int sum = 0;
  for (i = 0; i < cube.size(); i++) {
    if (cube[i] * cube[i + 1] == -1) {
      sum += 2;
      cube.erase(cube.begin() + i, cube.begin() + i + 2);
      i = max(i - 2, -1);
    }
  }
  cout << sum << endl;
  return 0;
}
