#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int n1 = log10(n) + 1;
  int a[n1];
  int k = n, i = n1 - 1, ans = 0;
  while (k) {
    a[i] = k % 10;
    k = k / 10;
    ans = max(ans, a[i]);
    --i;
  }
  cout << ans << endl;
  while (n > 0) {
    int k = 0;
    for (int i = 0; i < n1; ++i) {
      if (a[i] > 0)
        k = k * 10 + 1;
      else
        k = k * 10;
      a[i]--;
    }
    n = n - k;
    cout << k << " ";
  }
  return 0;
}
