#include <bits/stdc++.h>
using namespace std;
int main() {
  int kais = 0;
  string s;
  cin >> s;
  int a = 0, b = 0;
  while (a >= 0 || b >= 0) {
    a = (int)s.find("10");
    if (a >= 0) {
      s.replace(s.find("10"), 2, "");
      kais = kais + 1;
    }
    b = (int)s.find("01");
    if (b >= 0) {
      s.replace(s.find("01"), 2, "");
      kais = kais + 1;
    }
  }
  cout << kais * 2;
  system("pause");
  return 0;
}
