#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.tie(0);
  cin.sync_with_stdio(false);
  string ipt;
  cin >> ipt;
  int count = 0;
  bool flag = true;
  while (flag) {
    flag = false;
    for (int i = 0; i < ipt.length(); i++) {
      string tmp = ipt.substr(i, 2);
      if (tmp == "01" || tmp == "10") {
        ipt = ipt.substr(0, i) + ipt.substr(i + 2, ipt.length() - i - 1);
        count += 2;
        flag = true;
      }
    }
  }
  cout << count << '\n';
  return 0;
}
