#include <bits/stdc++.h>
using namespace std;
int main() {
  string cube;
  string first = "10", second = "01";
  int counter = 0;
  cin >> cube;
  while (cube.find(first) != -1) {
    cube.replace(cube.find(first), 2, "");
    counter += 2;
  }
  while (cube.find(second) != -1) {
    cube.replace(cube.find(second), 2, "");
    counter += 2;
  }
  cout << counter << endl;
  return 0;
}
