#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
inline int gcd(int a, int b) { return (a % b == 0) ? b : gcd(b, a % b); }
inline int fac(int n) { return (n == 0) ? 1 : n * fac(n - 1); }
int main() {
  string s;
  cin >> s;
  int total = 0;
  int cnt = 1;
  while (cnt > 0) {
    cnt = 0;
    for (int i = 0; i < s.length(); i++) {
      string word = s.substr(i, 2);
      if (word == "01" || word == "10") {
        s.erase(i, 2);
        cnt++;
      }
    }
    total += cnt;
  }
  cout << total * 2 << endl;
  return 0;
}
