#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int count = 0;
  while (s.size() > 2) {
    for (int i = 0; i < s.size(); ++i) {
      cout << s << endl;
      if (s.substr(i, 2) == "01" || s.substr(i, 2) == "10") {
        count += 2;
        s.erase(i, 2);
        break;
      }
    }
  }
  if ((s.size() == 2 && s == "10") || (s.size() == 2 && s == "01")) count += 2;
  cout << count << endl;
  return 0;
}
