#include <bits/stdc++.h>
using namespace std;
bool desc(const pair<long, int>& i, const pair<long, int>& j) {
  return i.first > j.first;
}
int main() {
  string s;
  cin >> s;
  string m1 = "01";
  string m2 = "10";
  int total = 0;
  while (1) {
    size_t x = s.find(m1);
    if (x == string::npos) x = s.find(m2);
    if (x != string::npos) {
      s.erase(x, m1.length());
      total += 2;
      continue;
    }
    if (x == string::npos) break;
  }
  cout << total << endl;
}
