import java.util.Scanner;

/**
 * https://abc057.contest.atcoder.jp/tasks/abc057_c
 */
public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(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 a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(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 a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(Math.max(String.valueOf(a).length(), String.valueOf(b).length()));
		

	} main {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(Math.max(String.valueOf(a).length(), String.valueOf(b).length()));
		

	} 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 a = (int) Math.sqrt(N)+1; a (int) Math.sqrt(N)+1 (int) Math.sqrt(N) Math.sqrt Math N 1 long b = 0; b 0 for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		} long i=a; long i=a; i a i>=1 i 1 i-- i-- i {
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		} {
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		} if(N%i==0){
				a=i;
				b=N/i;
				break;
			} N%i==0 N%i N i 0 {
				a=i;
				b=N/i;
				break;
			} a=i a i b=N/i b N/i N i break; System.out.println(Math.max(String.valueOf(a).length(), String.valueOf(b).length())) System.out.println System.out System System.out 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 String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(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 a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(Math.max(String.valueOf(a).length(), String.valueOf(b).length()));
		

	}

} Main
import java.util.Scanner;

/**
 * https://abc057.contest.atcoder.jp/tasks/abc057_c
 */
public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		sc.close();
		
		long a = (int) Math.sqrt(N)+1;
		long b = 0;
		for(long i=a; i>=1; i--){
			if(N%i==0){
				a=i;
				b=N/i;
				break;
			}
		}
		
		System.out.println(Math.max(String.valueOf(a).length(), String.valueOf(b).length()));
		

	}

}