#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[] = {1,      10,     11,     100,    101,    110,    111,    1000,
             1001,   1010,   1011,   1100,   1101,   1110,   1111,   10000,
             10001,  10010,  10011,  10100,  10101,  10110,  10111,  11000,
             11001,  11010,  11011,  11100,  11101,  11110,  11111,  100000,
             100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000,
             101001, 101010, 101011, 101100, 101101, 101110, 101111, 110000,
             110001, 110010, 110011, 110100, 110101, 110110, 110111, 111000,
             111001, 111010, 111011, 111100, 111101, 111110, 111111, 1000000};
  int l[n + 1];
  int m[n + 1];
  m[0] = 0;
  l[0] = 0;
  int i = 0;
  while (++i <= n) {
    l[i] = 1e9;
    int j = -1;
    while (++j < 64) {
      if (i >= a[j] && l[i] > 1 + l[i - a[j]])
        l[i] = 1 + l[i - a[j]], m[i] = a[j];
    }
  }
  cout << l[n] << endl;
  i = m[n];
  while (i) {
    cout << i << " ";
    n = n - i;
    i = m[n];
  }
}
