#include <bits/stdc++.h>
using namespace std;
template <typename T>
T prod(const T &a, const T &b) {
  return ((a % ((long long int)1e9 + 7)) * (b % ((long long int)1e9 + 7))) %
         ((long long int)1e9 + 7);
}
template <typename T>
T pow_(const T &a, const T &b) {
  if (!b) return 1;
  long long int p = pow_(a, b / 2);
  p *= p;
  return (b % 2) ? (p * a) : p;
}
template <typename T>
T modpow(const T &a, const T &b) {
  if (!b) return 1;
  long long int p = modpow(a, b / 2);
  p = prod(p, p);
  return (b % 2) ? (prod(p, a)) : p;
}
template <typename T>
T gcd(const T &a, const T &b) {
  if (!b) return a;
  return gcd(b, a % b);
}
template <typename T>
T lcm(const T &a, const T &b) {
  return (a * b) / gcd(a, b);
}
template <typename T>
T max(const T &a, const T &b, const T &c) {
  return max(a, max(b, c));
}
template <typename T>
T min(const T &a, const T &b, const T &c) {
  return min(a, min(b, c));
}
template <typename T>
void dbg(const vector<T> &a, int l, int r) {
  for (int i = l; i <= r; i++) cout << a[i] << " ";
  cout << endl;
}
template <typename T>
void dbg(const vector<T> &a) {
  for (int i = 0; i <= a.size() - 1; i++) cout << a[i] << " ";
  cout << endl;
}
void dbg(priority_queue<int, vector<int>, greater<int> > q) {
  while (!q.empty()) {
    cout << q.top() << endl;
    q.pop();
  }
}
void main_() {
  int n;
  scanf("%d", &n);
  vector<string> ans;
  while (n) {
    string cur;
    int temp = n;
    vector<int> arr;
    while (temp) {
      int dig = temp % 10;
      arr.push_back(dig);
      temp /= 10;
    }
    n = 0;
    reverse(arr.begin(), arr.end());
    if (arr.size())
      for (int i = 0; i <= arr.size() - 1; i++) {
        if (arr[i]) {
          cur.insert(cur.begin(), '1');
          arr[i]--;
        } else {
          if (cur.size()) cur.insert(cur.begin(), '0');
        }
        n = n * 10 + arr[i];
      }
    reverse(cur.begin(), cur.end());
    ans.push_back(cur);
  }
  cout << ans.size() << endl;
  for (int i = 0; i <= ans.size() - 1; i++) cout << ans[i] << " ";
  cout << endl;
}
int main() {
  { main_(); }
  return 0;
}
