import java.io.*;
import java.math.*;
import java.util.*;
public class Main { 

	public static void main(String[] args) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	}
} import java.io.*; io.* java import java.math.*; math.* java import java.util.*; util.* java public class Main { 

	public static void main(String[] args) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	} main { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) long N = input.nextLong(); N input.nextLong() input.nextLong input int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		} long i = 1; long i = 1; i 1 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		} {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		} if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			} N%i==0 N%i N i 0 {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			} long BigFactor = N/i; BigFactor N/i N i ans = Math.min(ans, Long.toString(BigFactor).length()) ans Math.min(ans, Long.toString(BigFactor).length()) Math.min Math ans Long.toString(BigFactor).length() Long.toString(BigFactor).length Long.toString(BigFactor) Long.toString Long BigFactor 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) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	}
} public class Main { 

	public static void main(String[] args) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	}
} Main
import java.io.*;
import java.math.*;
import java.util.*;
public class Main { 

	public static void main(String[] args) { //Look for adjacent outliers first
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		int ans = Integer.MAX_VALUE;
		for (long i = 1; i <= Math.sqrt(N); i++) {
			if (N%i==0) {
				long BigFactor = N/i;
				ans = Math.min(ans, Long.toString(BigFactor).length());
			}
		}
		System.out.println(ans);
	}
}