import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	}
	public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	}
	public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int ans = keta(N); ans keta(N) keta N for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		} long i = 1; long i = 1; i 1 i <= N / i i N / i N i i++ i++ i {
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		} {
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		} if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			} N % i == 0 N % i N i 0 {
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			} ans = Math.min(ans,keta(Math.max(N / i,i))) ans Math.min(ans,keta(Math.max(N / i,i))) Math.min Math ans keta(Math.max(N / i,i)) keta Math.max(N / i,i) Math.max Math N / i N i i System.out.println(ans) System.out.println System.out System System.out ans String args[] args public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	} keta {
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	} int count = 1; count 1 long buf = a; buf a while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		} buf / 10 != 0 buf / 10 buf 10 0 {
			count++;
			buf = buf / 10;
		} count++ count buf = buf / 10 buf buf / 10 buf 10 return count; count long a a public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	}
	public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	}
	public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	}
} Main
import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = keta(N);
		for(long i = 1;i <= N / i;i++){
			if(N % i == 0){
				ans = Math.min(ans,keta(Math.max(N / i,i)));
			}
		}
		System.out.println(ans);
	}
	public static int keta(long a){
		int count = 1;
		long buf = a;
		while(buf / 10 != 0){
			count++;
			buf = buf / 10;
		}
		return count;
	}
}