#include <bits/stdc++.h>
using namespace std;
string to_string1(int n) {
  string str;
  while (n > 0) {
    int t = n % 10;
    n /= 10;
    str += t + '0';
  }
  reverse(str.begin(), str.end());
  return str;
}
int main() {
  int n;
  cin >> n;
  vector<int> res;
  while (n > 0) {
    string s;
    int sz = to_string1(n).length();
    for (int i = 0; i < sz; ++i) {
      string r = to_string1(n);
      if (r[i] != '0') {
        s += "1";
      } else {
        s += "0";
      }
    }
    int val = atoi(s.c_str());
    n -= val;
    res.push_back(val);
  }
  cout << res.size() << endl;
  for (auto i : res) cout << i << " ";
}
