import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
	static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
	static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long ans = 100; ans 100 for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(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) {
				ans = Math.min(ans, getDigits(N/i));
			}
		} {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		} if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			} N%i==0 N%i N i 0 {
				ans = Math.min(ans, getDigits(N/i));
			} ans = Math.min(ans, getDigits(N/i)) ans Math.min(ans, getDigits(N/i)) Math.min Math ans getDigits(N/i) getDigits N/i N i System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	} getDigits {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	} int ans = 0; ans 0 while(x>0) {
			x /= 10;
			ans++;
		} x>0 x 0 {
			x /= 10;
			ans++;
		} x /= 10 x 10 ans++ ans return ans; ans long x x public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
	static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
	static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = 100;
		for(long i=1; i*i<=N; i++) {
			if(N%i==0) {
				ans = Math.min(ans, getDigits(N/i));
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
	static int getDigits(long x) {
		int ans = 0;
		while(x>0) {
			x /= 10;
			ans++;
		}
		return ans;
	}
}
