#include <bits/stdc++.h>
using namespace std;
#define ll long long
string s;
vector<ll>a;
int main() {
    cin>>s;
    ll m=1,l=0,r=0;
    while(m){
        for(int num=1;num<=10;num++){
            string t="";
            for(int i=l;i<=r;i++) t=t+s[i];
            ll sum=0,ans=1;
            for(int i=t.size()-1;i>=0;i--){
                sum+=(t[i]-'0')*ans;
                ans*=2;
            }
            if(sum>=0)  a.push_back(sum);
            l=r+1,r=l+num;
            if(l>=s.size()) break;
        }
        r=l;
        if(l>=s.size()) break;
    }
    cout<<a.size()<<endl;
    for(auto i:a) cout<<i<<" ";
    return 0;
}