#include <bits/stdc++.h>
const long long mod = (1e9 + 7);
using namespace std;
template <typename T>
ostream& operator<<(ostream& o, vector<T> a) {
  size_t n = a.size();
  size_t i = 0;
  while (a[i] == 0) i++;
  for (; i < n; i++) {
    o << a[i];
  }
  o << " ";
  return o;
}
template <typename T>
void display(T a[], int n) {
  for (int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
int solve() {
  string s;
  cin >> s;
  vector<int> a, c;
  vector<vector<int> > ans;
  for (int i = 0; i < s.size(); i++) {
    a.push_back(s[i] - '0');
    c.push_back(1);
  }
  int k = 0, flag = 1;
  while (flag) {
    flag = 0;
    for (long long i = 0; i < s.size(); i++) {
      if (a[i] == 0)
        c[i] = 0;
      else
        flag = 1;
      a[i] = a[i] - c[i];
    }
    ans.push_back(c);
    if (flag) k++;
  }
  cout << k << endl;
  for (long long i = 0; i < k; i++) {
    cout << ans[i];
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  for (long long i = 0; i < t; i++) solve();
  return 0;
}
