import java.util.*;
public class Main{
	public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	}
	public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	}
} import java.util.*; util.* java public class Main{
	public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	}
	public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	}
} Main public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	} order {
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	} int o=0; o 0 long d=1; d 1 while(d<=a){
			o++;d*=10;
		} d<=a d a {
			o++;d*=10;
		} o++ o d*=10 d 10 return o; o long a a public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	} maxOrder {
		return Math.max(order(a), order(b));
	} return Math.max(order(a), order(b)); Math.max(order(a), order(b)) Math.max Math order(a) order a order(b) order b long a a long b b public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	} main {
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long N =Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc int minF=order(N); minF order(N) order N for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		} long i=1; long i=1; i 1 i*i<=N i*i i i N i++ i++ i {
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		} {
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		} if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			} N%i==0 N%i N i 0 {
				minF=Math.min(minF,maxOrder(i,N/i));
			} minF=Math.min(minF,maxOrder(i,N/i)) minF Math.min(minF,maxOrder(i,N/i)) Math.min Math minF maxOrder(i,N/i) maxOrder i N/i N i System.out.println(minF) System.out.println System.out System System.out minF String[] args args public class Main{
	public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	}
	public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	}
} public class Main{
	public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	}
	public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	}
} Main
import java.util.*;
public class Main{
	public static int order(long a){
		int o=0;
		long d=1;
		while(d<=a){
			o++;d*=10;
		}
		return o;
	}
	public static int maxOrder(long a, long b){
		return Math.max(order(a), order(b));
	}
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long N =Long.parseLong(sc.next());
		int minF=order(N);
		for (long i=1;i*i<=N;i++){
			if(N%i==0){
				minF=Math.min(minF,maxOrder(i,N/i));
			}
		}
		System.out.println(minF);
	}
}
