#include <bits/stdc++.h>
using namespace std;
int SET(int N, int pos) { return N = N | (1 << pos); }
int RESET(int N, int pos) { return N = N & ~(1 << pos); }
bool CHECK(int N, int pos) { return (bool)(N & (1 << pos)); }
template <typename T>
inline T __lcm(T a, T b) {
  return (a * b) / __gcd(a, b);
}
struct node {
  int x, y, i;
};
int dx[] = {0, 1, 0, -1, -1, 1, 1, -1};
int dy[] = {1, 0, -1, 0, 1, 1, -1, -1};
void solve() {
  string s;
  cin >> s;
  int p = 0, q = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      p++;
    } else {
      q++;
    }
  }
  cout << (min(p, q) * 2) << endl;
}
int main() {
  solve();
  return 0;
}
