#include <bits/stdc++.h>
using namespace std;

signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);

  string s;
  cin >> s;
  int p = 0;
  vector<int> ans;
  int n = s.size();
  int len = 1;
  while (p + len <= n) {
    ans.push_back(stoll(s.substr(p, len), 0, 2));
    p += len;
    len = len % 10 + 1;
  }
  
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " \n"[i == ans.size() - 1];
  }

  return 0;
}