#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
const int INF = 1e9;
int n;
vector<int> a;
void generate() {
  for (int i = 1; i <= (1 << 6); i++) {
    int x = i, num = 0, stt = 0;
    while (x) {
      num += (x & 1) * pow(10, stt);
      x >>= 1;
      stt++;
    }
    a.push_back(num);
  }
}
int f[N], trace[N];
int main() {
  cin >> n;
  generate();
  fill(f, f + N, INF);
  f[0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int x : a) {
      if (i - x < 0) break;
      if (1 + f[i - x] < f[i]) {
        f[i] = 1 + f[i - x];
        trace[i] = x;
      }
    }
  }
  cout << f[n] << endl;
  while (n > 0) {
    cout << trace[n] << " ";
    n -= trace[n];
  }
  cout << endl;
  return 0;
}
