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.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

public class B538 {
	
	static class TaskA
    {
        public void solve(int testNumber, InputReader in, PrintWriter out) 
        {
        	int n=in.nextInt();

        	ArrayList<String> al=new ArrayList<>();
        	int count=0;
        	while(n>0)
        	{
            	String s=""+n;
            	String temp="";
        		for(int i=0;i<s.length();i++)
        		{
        		if(s.charAt(i)!='0')
        		{
        			temp+="1";
        		}
        		else
        		{
        			temp+="0";
        		}
        		}
        		al.add(temp);
        		n-=Integer.parseInt(temp);
        		count++;
        	}
        	out.println(count);
        	for(String g:al)
        	{
        		out.print(g+" ");
        	}
        	
        }
    }
       
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
  
    static int binarysearch(int[] a, int start, int end, int x) {
		if (x < a[start]) return start;	
		if (x >= a[end]) return end+1;
		int mid = (start + end)/2;
		if (x < a[mid]) return binarysearch(a, start, mid, x);
		else return binarysearch(a, mid+1, end, x);
	}
    
    static void radixSort(int[] xs){
		int[] cnt = new int[(1<<16)+1];
		int[] ys = new int[xs.length];	
		for(int j = 0; j <= 16; j += 16) 
		{	Arrays.fill(cnt, 0);
			for(int x : xs) { cnt[(x>>j&0xFFFF)+1]++; }
			for(int i = 1; i < cnt.length; i++) { cnt[i] += cnt[i-1]; }
			for(int x : xs) { ys[cnt[x>>j&0xFFFF]++] = x; }
			{ final int[] t = xs; xs = ys; ys = t; }   }
		if(xs[0] < 0 || xs[xs.length - 1] >= 0) 
			return;
		int i, j, c;
		for(i = xs.length - 1, c = 0; xs[i] < 0; i--, c++) { ys[c] = xs[i]; }
		for(j = xs.length - 1; i >= 0; i--, j--) { xs[j] = xs[i]; }
		for(i = c - 1; i >= 0; i--) { xs[i] = ys[c-1-i]; }
	}
   
    static long min(long x,long y){return x<y?x:y;}
    static long min(long x,long y,long z){return x<y?(x<z?x:z):(y<z?y:z);}
    static long max(long x,long y){return x>y?x:y;}
    static long max(long x,long y,long z){return x>y?(x>z?x:z):(y>z?y:z);}
    static int min(int x,int y){return x<y?x:y;}
    static int min(int x,int y,int z){return x<y?(x<z?x:z):(y<z?y:z);}
    static int max(int x,int y){return x>y?x:y;}
    static int max(int x,int y,int z){return x>y?(x>z?x:z):(y>z?y:z);}
    
    static int abs(int x){if(x>=0)return x;else return -x;}
    static long abs(long x){if(x>=0)return x;else return -x;}
    
    static long sumarr(int arr[],int n1,int n2){
    	long sum=0; for(int i=n1-1;i<n2;i++) sum=sum+arr[i];  return sum; }
    
    
//**************************************Reader Class*********************************************//
    
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        
        public String nextLine() {
			String fullLine=null;
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					fullLine=reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
				return fullLine;
			}
			return fullLine;
		}

        public int nextInt() {
            return Integer.parseInt(next());
        }
        
        public long nextLong() {
        	return Long.parseLong(next());
        }
        
        public double nextDouble() {
        	return Double.parseDouble(next());
        }

    }
}