#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int main() {
  vector<int> v;
  for (int i = 1; i < N; i++) {
    int z;
    z = i;
    bool p = 1;
    while (z) {
      if (z % 10 == 1 || z % 10 == 0) {
        z = z / 10;
        continue;
      } else {
        p = 0;
        break;
      }
    }
    if (p) v.push_back(i);
  }
  int dp[N][2];
  for (int i = 0; i < N; i++) {
    dp[i][0] = INT_MAX;
  }
  for (auto it : v) {
    dp[it][0] = 1;
    dp[it][1] = it;
  }
  for (int i = 1; i < N; i++) {
    if (dp[i][0] != INT_MAX) {
      for (auto it : v) {
        int z = i + it;
        if (z < N) {
          if (dp[z][0] > dp[i][0] + 1) {
            dp[z][0] = dp[i][0] + 1;
            dp[z][1] = it;
          }
        } else {
          break;
        }
      }
    }
  }
  int n;
  scanf("%d", &n);
  ;
  cout << dp[n][0] << "\n";
  vector<int> ans;
  while (n != 0) {
    ans.push_back(dp[n][1]);
    n = n - dp[n][1];
  }
  for (auto it : ans) cout << it << " ";
}
