import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	}
	
	public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	}
	
	public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}

} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	} main {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc sc.close() sc.close sc long k = (int) Math.sqrt(N); k (int) Math.sqrt(N) Math.sqrt Math N while(N%k!=0){
			k--;
		} N%k!=0 N%k N k 0 {
			k--;
		} k-- k System.out.println(func(k,N/k)) System.out.println System.out System System.out func(k,N/k) func k N/k N k String[] args args public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	} func {
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	} return Math.max(String.valueOf(a).length(), String.valueOf(b).length()); Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b long a a long b b public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	}
	
	public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	}
	
	public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long k = (int) Math.sqrt(N);
		while(N%k!=0){
			k--;
		}
		System.out.println(func(k,N/k));

	}
	
	public static int func(long a, long b){
		return Math.max(String.valueOf(a).length(), String.valueOf(b).length());
	}

}