import java.io.*;
import java.util.*;
class Main
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	
    public static void main(String args[]) throws Exception
    {
		long n=sc.nextLong();long min=Long.MAX_VALUE;
		
		
		for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		}
		
		out.println(min);out.close();
		
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    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());
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	
    public static void main(String args[]) throws Exception
    {
		long n=sc.nextLong();long min=Long.MAX_VALUE;
		
		
		for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		}
		
		out.println(min);out.close();
		
    }
} Main static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) static FastScanner sc=new FastScanner(br); sc new FastScanner(br) static PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) static Random rnd=new Random(); rnd new Random() public static void main(String args[]) throws Exception
    {
		long n=sc.nextLong();long min=Long.MAX_VALUE;
		
		
		for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		}
		
		out.println(min);out.close();
		
    } main {
		long n=sc.nextLong();long min=Long.MAX_VALUE;
		
		
		for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		}
		
		out.println(min);out.close();
		
    } long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long min=Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		} long i=1; long i=1; i 1 i*i<=n i*i i i n i++ i++ i {
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		} {
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		} if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			} n%i==0 n%i n i 0 {
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			} min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length())) min Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length())) Math.min Math min Math.max(Long.toString(i).length(),Long.toString(n/i).length()) Math.max Math Long.toString(i).length() Long.toString(i).length Long.toString(i) Long.toString Long i Long.toString(n/i).length() Long.toString(n/i).length Long.toString(n/i) Long.toString Long n/i n i out.println(min) out.println out min out.close() out.close out String args[] args class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    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());
    }
} FastScanner BufferedReader in; in StringTokenizer st; st public FastScanner(BufferedReader in) {
        this.in = in;
    } FastScanner {
        this.in = in;
    } this.in = in this.in this this.in in BufferedReader in in public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    } nextToken {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    } while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
            st = new StringTokenizer(in.readLine());
        } st = new StringTokenizer(in.readLine()) st new StringTokenizer(in.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public String next() throws Exception {
		return nextToken().toString();
	} next {
		return nextToken().toString();
	} return nextToken().toString(); nextToken().toString() nextToken().toString nextToken() nextToken public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    } nextInt {
        return Integer.parseInt(nextToken());
    } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    } nextLong {
        return Long.parseLong(nextToken());
    } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    } nextDouble {
        return Double.parseDouble(nextToken());
    } return Double.parseDouble(nextToken()); Double.parseDouble(nextToken()) Double.parseDouble Double nextToken() nextToken
import java.io.*;
import java.util.*;
class Main
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	
    public static void main(String args[]) throws Exception
    {
		long n=sc.nextLong();long min=Long.MAX_VALUE;
		
		
		for(long i=1;i*i<=n;i++)
		{
			
			if(n%i==0)
			{
				min=Math.min(min,Math.max(Long.toString(i).length(),Long.toString(n/i).length()));
			}
		}
		
		out.println(min);out.close();
		
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    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());
    }
}