#include <bits/stdc++.h>
using namespace std;
void bin(int n) {
  string s = "";
  while (n) {
    s = (char)('0' + n % 2) + s;
    n = n / 2;
  }
  cout << s << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int x, i, n = 0, m, c, d = 0;
  cin >> x;
  m = x;
  while (m) {
    n = max(n, m % 10);
    m = m / 10;
  }
  vector<int> a(n, 0);
  m = x;
  while (m) {
    c = m % 10;
    for (i = 0; i < c; i++) {
      a[i] = a[i] | (1 << d);
    }
    m = m / 10;
    d++;
  }
  cout << n << endl;
  for (i = 0; i < n; i++) bin(a[i]);
  cout << endl;
}
