#include <bits/stdc++.h>
const int inf = 1e9;
const int mod = (int)1e9 + 7;
using namespace std;
template <class T>
void smin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void smax(T& a, T val) {
  if (a < val) a = val;
}
const int N = 1e6 + 10;
int n;
vector<int> v;
bool is_binary(int n) {
  bool good = 1;
  while (n) {
    int d = n % 10;
    good &= (d == 0 or d == 1);
    n /= 10;
  }
  return good;
}
int dp[N];
int solve(int N) {
  if (N < 0) {
    return inf;
  }
  if (N == 0) {
    return 0;
  }
  int& ans = dp[N];
  if (~ans) return ans;
  ans = inf;
  for (int i = 0; i < (int)(v.size()); ++i) {
    if (v[i] > N) break;
    smin(ans, 1 + solve(N - v[i]));
  }
  return ans;
}
vector<int> path;
void trace(int N) {
  if (N < 0) {
    return;
  }
  if (N == 0) {
    return;
  }
  int ans = solve(N);
  for (int i = 0; i < (int)(v.size()); ++i) {
    if (v[i] > N) break;
    if (ans == 1 + solve(N - v[i])) {
      trace(N - v[i]);
      path.push_back(v[i]);
      return;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  for (int i = 1; i < N; ++i) {
    if (is_binary(i)) {
      v.push_back(i);
    }
  }
  int n;
  cin >> n;
  memset(dp, -1, sizeof dp);
  cout << solve(n) << '\n';
  trace(n);
  for (auto it : path) cout << it << ' ';
  return 0;
}
