#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:133217728")
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000007;
int dp[1000000];
int pr[1000000];
vector<int> v;
int main() {
  int n;
  cin >> n;
  if (n == 1000000) {
    cout << 1 << endl;
    cout << n << endl;
    return 0;
  }
  for (int i = (1); i < (1 << 6); ++i) {
    int s = 0;
    for (int j = (6) - 1; j >= (0); --j) {
      s *= 10;
      if ((i >> j) & 1) s++;
    }
    v.push_back(s);
  }
  dp[0] = 0;
  for (int i = (1); i < (1000000); ++i) {
    dp[i] = INF;
  }
  for (int i = (0); i < (1000000); ++i) {
    for (int j = (0); j < (v.size()); ++j)
      if (i + v[j] < 1000000) {
        if (dp[i] + 1 < dp[i + v[j]]) {
          dp[i + v[j]] = dp[i] + 1;
          pr[i + v[j]] = v[j];
        }
      }
  }
  cout << dp[n] << endl;
  while (n > 0) {
    cout << pr[n] << " ";
    n -= pr[n];
  }
  return 0;
}
