#include <bits/stdc++.h>
double const EPS = 3e-8;
using namespace std;
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
const int MX = 1e7;
const int INF = 1 << 29;
vector<int> num;
void did(int x) {
  if (x > MX) return;
  num.push_back(x);
  did(x * 10);
  did(x * 10 + 1);
}
int dp[MX + 10], lst[MX];
int main() {
  did(1);
  unique(num.begin(), num.end());
  sort(num.begin(), num.end());
  int n = ({
    int a;
    read(a);
    a;
  });
  int sz = num.size();
  vector<int> ans;
  int i, j;
  for (i = 0; i <= n; i++) dp[i] = INF;
  dp[0] = 0;
  for (i = 0; i < sz; i++) {
    for (j = 0; j <= n; j++) {
      if (j - num[i] >= 0 && dp[j - num[i]] + 1 < dp[j]) {
        dp[j] = dp[j - num[i]] + 1;
        lst[j] = num[i];
      }
    }
  }
  bool sp = 0;
  cout << dp[n] << endl;
  int now = n;
  while (now) {
    if (sp) cout << " ";
    sp = 1;
    cout << lst[now];
    now -= lst[now];
  }
  return 0;
}
