#include <bits/stdc++.h>
using namespace std;
int N, D[1000006], F[1000006];
bool check(int n) {
  for (; n; n /= 10)
    if (n % 10 > 1) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> N;
  vector<int> nums;
  for (int i = 1; i <= N; i++)
    if (check(i)) nums.push_back(i);
  for (int i = 1; i <= N; i++) D[i] = 2e9;
  for (int i = 0; i < N; i++)
    if (D[i] < 2e9) {
      for (int n : nums) {
        if (i + n > N) break;
        if (D[i + n] > D[i] + 1) D[i + n] = D[i] + 1, F[i + n] = i;
      }
    }
  vector<int> ans;
  for (int i = N; i; i = F[i]) ans.push_back(i - F[i]);
  printf("%d\n", ((int)(ans).size()));
  for (int t : ans) printf("%d ", t);
  puts("");
}
