#include <bits/stdc++.h>
using namespace ::std;
inline string replace(string str, string before, std::string after) {
  string::size_type Pos(str.find(before));
  while (Pos != std::string::npos) {
    str.replace(Pos, before.length(), after);
    Pos = str.find(before, Pos + after.length());
  }
  return str;
}
inline vector<string> split(string &s, string delim) {
  vector<string> elems;
  s = replace(s, "#", "HASH");
  s = replace(s, delim, "#");
  stringstream ss(s);
  string item;
  while (getline(ss, item, '#')) {
    elems.push_back(replace(item, "HASH", "#"));
  }
  return elems;
}
inline vector<int> cross(vector<int> a, vector<int> b) {
  return {a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2],
          a[0] * b[1] - a[1] * b[0]};
}
inline int GCD(int a, int b) {
  if (a < b) swap(a, b);
  if (a % b != 0)
    GCD(b, a % b);
  else
    return b;
}
inline vector<long long> primeList(long long n) {
  vector<bool> p(n + 1);
  vector<long long> list;
  for (long long i = long long(1); i < long long(n + 1); i++) p[i] = true;
  for (long long i = long long(2); i < long long(sqrt(n) + 1); i++) {
    if (p[i]) {
      for (long long j = long long(2); j < long long(n / i + 1); j++) {
        p[i * j] = false;
      }
    }
  }
  for (long long i = long long(2); i < long long(n + 1); i++)
    if (p[i]) list.push_back(i);
  return list;
}
inline bool isPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) return false;
  }
  return true;
}
template <typename T>
class Stack {
  vector<T> stack;

 public:
  void push(T num) { stack.push_back(num); }
  T pop() {
    T num = stack[stack.size() - 1];
    stack.erase(stack.end() - 1);
    return num;
  }
};
template <typename T>
class Queue {
  deque<T> queue;

 public:
  void push(T num) { queue.push_front(num); }
  void push_back(T num) { queue.push_back(num); }
  T pop() {
    T num = queue[queue.size() - 1];
    queue.pop_back();
    return num;
  }
  bool empty() { return queue.empty(); }
};
int main() {
  string s;
  cin >> s;
  int a0, a1;
  for (char c : s) {
    if (c - '0')
      a1++;
    else
      a0++;
  }
  (cout << fixed << setprecision(15)) << min(a0, a1) * 2 << "\n";
}
