111111
 100009
 10011
 1000000
 8
 10201
 102030
 908172
 123456
 415
 900000
 21
 909090
 314159
 999999
 909823
 987654
 1453
 1435
 98
 10
 2
 1

1
111111
 9
100001 1 1 1 1 1 1 1 1
 1
10011
 1
1000000
 8
1 1 1 1 1 1 1 1
 2
10101 100
 3
101010 1010 10
 9
101111 101011 101010 101010 101010 101010 101010 101000 100000
 6
111111 11111 1111 111 11 1
 5
111 101 101 101 1
 9
100000 100000 100000 100000 100000 100000 100000 100000 100000
 2
11 10
 9
101010 101010 101010 101010 101010 101010 101010 101010 101010
 9
111111 101011 101011 1011 11 1 1 1 1
 9
111111 111111 111111 111111 111111 111111 111111 111111 111111
 9
101111 101111 101101 101100 101100 101100 101100 101100 101000
 9
111111 111111 111111 111111 111110 111100 111000 110000 100000
 5
1111 111 111 110 10
 5
1111 111 111 101 1
 9
11 11 11 11 11 11 11 11 10
 1
10
 2
1 1
 1
1

import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;

import static java.lang.Math.*;

public class Solution implements Runnable {
	
    void solve() throws Exception {
    	int n = sc.nextInt();
    	int[] dp = new int[n + 1];
    	int[] pr = new int[n + 1];
    	int[] val = new int[n + 1];
    	Arrays.fill(dp, Integer.MAX_VALUE);
    	Arrays.fill(pr, -1);
    	Arrays.fill(val, 0);
    	dp[0] = 0;
    	for (int i = 1; i <= n; i++) {
    		for (int mask = 1; mask < (1 << 7); mask++) {
    			int cur = 0;
    			for (int j = 6; j >= 0; --j) {
    				cur = cur * 10 + ((mask >> j) & 1); 
    			}
    			if (cur > i) break;
    			if (dp[i] > dp[i - cur] + 1) {
    				dp[i] = dp[i - cur] + 1;
    				pr[i] = i - cur;
    				val[i] = cur;
    			}
    		}
    	}
    	out.println(dp[n]);
    	while (n > 0) {
    		out.print(val[n] + " ");
    		n = pr[n];
    	}
    }
    
    BufferedReader in;
    PrintWriter out;
    FastScanner sc;
    
    static Throwable throwable;
    
    public static void main(String[] args) throws Throwable {
        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (throwable != null)
            throw throwable;
    }
    
    
    public void run() {
        try {
            //in = new BufferedReader(new FileReader("input.txt"));
            //out = new PrintWriter(new FileWriter("output.txt"));
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            sc = new FastScanner(in);
            solve();
        } catch (Exception e) {
            throwable = e;
        } finally {
            out.close();
        }
    }
}

class FastScanner {
    BufferedReader reader;
    StringTokenizer strTok;
    
    FastScanner(BufferedReader reader) {
        this.reader = reader;
    }
    
    public String nextToken() throws Exception {
        while (strTok == null || !strTok.hasMoreTokens())
            strTok = new StringTokenizer(reader.readLine());
        return strTok.nextToken();
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}