import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) long N=scan.nextLong(); N scan.nextLong() scan.nextLong scan long a=(long) Math.sqrt(N); a (long) Math.sqrt(N) Math.sqrt Math N int ans=100000000; ans 100000000 for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		} int i=1; int i=1; i 1 i<a+1 i a+1 a 1 i++ i++ i {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		} {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		} long b=1000000000; b 1000000000 long c=1000000000; c 1000000000 if(N%i==0) {
				b=N/i;
				c=i;
			} N%i==0 N%i N i 0 {
				b=N/i;
				c=i;
			} b=N/i b N/i N i c=i c i int lb=String.valueOf(b).length(); lb String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b int lc=String.valueOf(c).length(); lc String.valueOf(c).length() String.valueOf(c).length String.valueOf(c) String.valueOf String c if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			} Math.max(lb,lc)<ans Math.max(lb,lc) Math.max Math lb lc ans {
				ans=Math.max(lb,lc);
			} ans=Math.max(lb,lc) ans Math.max(lb,lc) Math.max Math lb lc System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner scan=new Scanner(System.in);
		long N=scan.nextLong();
		long a=(long) Math.sqrt(N);
		int ans=100000000;
		for(int i=1;i<a+1;i++) {
			long b=1000000000;
			long c=1000000000;
			if(N%i==0) {
				b=N/i;
				c=i;
			}
			
			int lb=String.valueOf(b).length();
			int lc=String.valueOf(c).length();
			if(Math.max(lb,lc)<ans){
				ans=Math.max(lb,lc);
			}
		}
		System.out.println(ans);
	}
}