#include <bits/stdc++.h>
using namespace std;
int a, z, k, r;
int v[109];
int ans[1000009];
int w[1000009][2];
int main() {
  scanf("%d", &a);
  k = 1;
  for (int i = 1; i < 1000001; i++) {
    z = i;
    while (z > 0) {
      if (z % 10 != 0 && z % 10 != 1) {
        z = -1;
        break;
      }
      z = z / 10;
    }
    if (z != -1) {
      v[k] = i;
      k++;
      w[i][0] = 1;
      w[i][1] = k - 1;
    } else
      w[i][0] = 9999999;
  }
  for (int i = 1; i < k; i++)
    for (int j = 0; j < 1000001 - v[i]; j++)
      if (w[j][0] + 1 < w[j + v[i]][0]) {
        w[j + v[i]][0] = w[j][0] + 1;
        w[j + v[i]][1] = i;
      }
  while (a > 0) {
    ans[r] = v[w[a][1]];
    a = a - v[w[a][1]];
    r++;
  }
  printf("%d\n", r);
  for (int i = 0; i < r; i++) printf("%d ", ans[i]);
}
