import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	} main {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc sc.close() sc.close sc int answer = Integer.MAX_VALUE; answer Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		} int i = 1; int i = 1; i 1 i <=  Math.sqrt((double)N) i Math.sqrt((double)N) Math.sqrt Math (double)N i++ i++ i {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		} {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		} if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			} N % i == 0 N % i N i 0 {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			} long A = i; A i long B = N / i; B N / i N i int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length()); tmp 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 if(tmp < answer) answer = tmp; tmp < answer tmp answer answer = tmp answer tmp {
				continue;
			} continue; System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long N = Long.parseLong(sc.next());
		sc.close();

		int answer = Integer.MAX_VALUE;
		for(int i = 1; i <=  Math.sqrt((double)N); i++) {
			if(N % i == 0) {
				long A = i;
				long B = N / i;
				int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
				if(tmp < answer) answer = tmp;
			}else {
				continue;
			}
		}
		System.out.println(answer);

	}

}