import java.io.*;
import java.util.*;

class Main {

	private static int f(long a) {
		int count = 0;
		while (a > 0) {
			count++;
			a /= 10;
		}

		return count;
	}

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		int a = f(N);
		for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		}

		System.out.println(a);
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main {

	private static int f(long a) {
		int count = 0;
		while (a > 0) {
			count++;
			a /= 10;
		}

		return count;
	}

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		int a = f(N);
		for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		}

		System.out.println(a);
	}
} Main private static int f(long a) {
		int count = 0;
		while (a > 0) {
			count++;
			a /= 10;
		}

		return count;
	} f {
		int count = 0;
		while (a > 0) {
			count++;
			a /= 10;
		}

		return count;
	} int count = 0; count 0 while (a > 0) {
			count++;
			a /= 10;
		} a > 0 a 0 {
			count++;
			a /= 10;
		} count++ count a /= 10 a 10 return count; count long a a public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		int a = f(N);
		for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		}

		System.out.println(a);
	} main {
		final Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		int a = f(N);
		for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		}

		System.out.println(a);
	} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int a = f(N); a f(N) f N for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		} long i = 1; long i = 1; i 1 i * i <= N i * i i i N i++ i++ i {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		} {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		} if (N % i != 0) continue; N % i != 0 N % i N i 0 continue; int x = Math.max(f(i), f(N / i)); x Math.max(f(i), f(N / i)) Math.max Math f(i) f i f(N / i) f N / i N i a = Math.min(a, x) a Math.min(a, x) Math.min Math a x System.out.println(a) System.out.println System.out System System.out a String[] args args
import java.io.*;
import java.util.*;

class Main {

	private static int f(long a) {
		int count = 0;
		while (a > 0) {
			count++;
			a /= 10;
		}

		return count;
	}

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		int a = f(N);
		for (long i = 1; i * i <= N; i++) {
			if (N % i != 0) continue;
			int x = Math.max(f(i), f(N / i));
			a = Math.min(a, x);
		}

		System.out.println(a);
	}
}
