import java.io.PrintWriter;
import java.util.Scanner;

public class Main{
	static final int MOD = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	}
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main{
	static final int MOD = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	}
} Main static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc sc.close() sc.close sc int ans = 10; ans 10 for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		} long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		} {
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		} if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			} n % i == 0 n % i n i 0 {
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			} long j = n / i; j n / i n i long greater = Math.max(i,j); greater Math.max(i,j) Math.max Math i j int temp = 0; temp 0 while(greater != 0){
					temp++;
					greater /= 10;
				} greater != 0 greater 0 {
					temp++;
					greater /= 10;
				} temp++ temp greater /= 10 greater 10 ans = Math.min(ans, temp) ans Math.min(ans, temp) Math.min Math ans temp out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main{
	static final int MOD = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	}
} public class Main{
	static final int MOD = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	}
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main{
	static final int MOD = 1000000007;
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		//入力
		long n = sc.nextLong();
		sc.close();

		//処理
		int ans = 10;
		for(long i = 1; i * i <= n; i++){
			if(n % i == 0){
				long j = n / i;
				long greater = Math.max(i,j);
				int temp = 0;
				while(greater != 0){
					temp++;
					greater /= 10;
				}
				ans = Math.min(ans, temp);
			}
		}

		//出力	
		out.println(ans);
		out.flush();
	}
}