import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	} main {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan long a a a_len; a_len long b b b_len; b_len long min = 99999999; min 99999999 for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		} long i=(long) Math.sqrt(N); long i=(long) Math.sqrt(N); i (long) Math.sqrt(N) Math.sqrt Math N i>=1 i 1 i-- i-- i {
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		} {
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		} if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			} N % i == 0 N % i N i 0 {
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			} a = i a i b = N / i b N / i N i a_len = String.valueOf(a).length() a_len String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a b_len = String.valueOf(b).length() b_len String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				} a_len > b_len a_len b_len {
					min = a_len;
				} min = a_len min a_len {
					min = b_len;
				} min = b_len min b_len break; System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		long N = scan.nextLong();
		long a,a_len;
		long b,b_len;
		long min = 99999999;
		
		for(long i=(long) Math.sqrt(N);i>=1;i--){
			if(N % i == 0){
				a = i;
				b = N / i;
				
				a_len = String.valueOf(a).length();
				b_len = String.valueOf(b).length();
				
				if(a_len > b_len){
					min = a_len;
				}else{
					min = b_len;
				}
				break;
			}
		}
		
		System.out.println(min);
	}

}
