#include <bits/stdc++.h>
using namespace std;
int Q[65];
int p[10] = {1, 10, 100, 1000, 10000, 100000, 1000000};
int conv(int x) {
  int i = 0;
  int res = 0;
  while (x != 0) {
    if (x & 1) res += p[i];
    x >>= 1;
    i++;
  }
  return res;
}
void fill_Q() {
  for (int i = 1; i < 65; i++) Q[i] = conv(i);
}
int DP[1000003];
int main() {
  int n;
  cin >> n;
  memset(Q, 0, sizeof Q);
  fill_Q();
  fill(DP, DP + n + 1, 10000000);
  DP[0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < 65; j++) {
      if (Q[j] > i) break;
      DP[i] = min(DP[i], DP[i - Q[j]]);
    }
    DP[i]++;
  }
  cout << DP[n] << endl;
  vector<int> res;
  while (n > 0)
    for (int i = 0; i < 65; i++)
      if (DP[n - Q[i]] == DP[n] - 1) {
        n -= Q[i];
        res.push_back(Q[i]);
        break;
      }
  for (int i = 0; i < res.size(); i++) cout << res[i] << " ";
  cout << endl;
  return 0;
}
