#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
string s;
vector<int> v;
ll solve(int l, int r) {
    ll sum = 0;
    for (int i = l; i <= r; i++) {
        int t = s[i] - '0';
        sum = sum * 2 + t;
    }
    return sum;
}
int main() {
    cin >> s;
    int l = 0, r = -1;
    while (1) {
        for (int i = 1; i <= 10; i++) {
            l = r + 1, r += i;
            if (r >= s.size()) {
                cout << v.size() << '\n';
                for (auto t : v) cout << t << ' ';
                return 0;
            }
            v.push_back(solve(l, r));
        }
    }
    return 0;
}