import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		double root_N = Math.sqrt((double)N);
		int root_N_kirisute = (int)root_N;
		//a<b
		//int a = 1;
		long b = N;
		for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		}
		int b_keta = (int)Math.log10((double)b) + 1;
		System.out.println(b_keta);
		
	}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		double root_N = Math.sqrt((double)N);
		int root_N_kirisute = (int)root_N;
		//a<b
		//int a = 1;
		long b = N;
		for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		}
		int b_keta = (int)Math.log10((double)b) + 1;
		System.out.println(b_keta);
		
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		double root_N = Math.sqrt((double)N);
		int root_N_kirisute = (int)root_N;
		//a<b
		//int a = 1;
		long b = N;
		for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		}
		int b_keta = (int)Math.log10((double)b) + 1;
		System.out.println(b_keta);
		
	} main {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		double root_N = Math.sqrt((double)N);
		int root_N_kirisute = (int)root_N;
		//a<b
		//int a = 1;
		long b = N;
		for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		}
		int b_keta = (int)Math.log10((double)b) + 1;
		System.out.println(b_keta);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc double root_N = Math.sqrt((double)N); root_N Math.sqrt((double)N) Math.sqrt Math (double)N int root_N_kirisute = (int)root_N; root_N_kirisute (int)root_N long b = N; b N for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		} int i = root_N_kirisute; int i = root_N_kirisute; i root_N_kirisute i>=2 i 2 i-- i-- i {
			if(N%i == 0){
				b = (N/i);
				break;
			}
		} {
			if(N%i == 0){
				b = (N/i);
				break;
			}
		} if(N%i == 0){
				b = (N/i);
				break;
			} N%i == 0 N%i N i 0 {
				b = (N/i);
				break;
			} b = (N/i) b (N/i) N i break; int b_keta = (int)Math.log10((double)b) + 1; b_keta (int)Math.log10((double)b) + 1 (int)Math.log10((double)b) Math.log10 Math (double)b 1 System.out.println(b_keta) System.out.println System.out System System.out b_keta String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		double root_N = Math.sqrt((double)N);
		int root_N_kirisute = (int)root_N;
		//a<b
		//int a = 1;
		long b = N;
		for(int i = root_N_kirisute; i>=2; i--){
			if(N%i == 0){
				b = (N/i);
				break;
			}
		}
		int b_keta = (int)Math.log10((double)b) + 1;
		System.out.println(b_keta);
		
	}

}
