#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> result;
int pos = 0; // 当前位置
int length = 1; // 当前要取的子串长度
while (pos < s.size()) {
// 检查剩余字符是否足够
if (pos + length <= s.size()) {
// 直接计算二进制值(比stoi+change更高效)
int num = 0;
for (int i = pos; i < pos + length; i++) {
num = num * 2 + (s[i] - '0');
}
result.push_back(num);
// 更新位置和长度
pos += length;
length = (length == 10) ? 1 : length + 1;
} else {
break; // 剩余字符不足
}
}
// 输出结果
cout << result.size() << endl;
for (int i = 0; i < result.size(); i++) {
cout << result[i];
if (i != result.size() - 1) cout << " ";
}
cout << endl;
return 0;
}