#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  vector<int> cube(S.size());
  int ans = 0;
  for (int i = 0; i < S.size(); i++) cube.at(i) = (S.at(i) == '0' ? 0 : 1);
  bool b = true;
  while (b) {
    b = false;
    for (int i = 0; i < cube.size() - 1; i++) {
      if (cube.at(i) + cube.at(i + 1) == 1) {
        cube.erase(cube.begin() + i + 1, cube.begin() + i + 2);
        ans++;
        b = true;
        i = 0;
      }
    }
  }
  cout << ans * 2 << endl;
  return 0;
}
