#include <bits/stdc++.h>
using namespace std;
vector<int> v, ans;
void rec(int d, int num) {
  if (d == 7) return;
  v.push_back(num);
  rec(d + 1, num * 10);
  rec(d + 1, num * 10 + 1);
}
int main() {
  rec(0, 1);
  v.push_back(1000000);
  sort((v).begin(), (v).end());
  int n, t = 1000000;
  cin >> n;
  while (n) {
    if (n - t >= 0) {
      n -= t;
      bool flag = 0;
      for (int i = 0; i < (int)ans.size(); ++i) {
        if (find((v).begin(), (v).end(), ans[i] + t) != v.end()) {
          ans[i] += t;
          flag = 1;
          break;
        }
      }
      if (!flag) ans.push_back(t);
    } else {
      t /= 10;
    }
  }
  cout << (int)ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
