import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	}

	private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	}

	private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	}
} Main public static void main(String[] args) {
		new Main().execute();
	} main {
		new Main().execute();
	} new Main().execute() new Main().execute new Main() String[] args args public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	} execute {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long minFab = Integer.MAX_VALUE; minFab Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		} int i = 1, cap = (int) Math.sqrt(N) + 1; int i = 1 i 1 cap = (int) Math.sqrt(N) + 1; cap (int) Math.sqrt(N) + 1 (int) Math.sqrt(N) Math.sqrt Math N 1 i <= cap i cap i++ i++ i {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		} {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		} long a = i; a i if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			} N % a == 0 N % a N a 0 {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			} long b = N / i; b N / i N i minFab = Math.min(minFab, F(a, b)) minFab Math.min(minFab, F(a, b)) Math.min Math minFab F(a, b) F a b System.out.println(minFab) System.out.println System.out System System.out minFab sc.close() sc.close sc private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	} F {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	} return Math.max(Long.toString(a).length(), Long.toString(b).length()); Math.max(Long.toString(a).length(), Long.toString(b).length()) Math.max Math Long.toString(a).length() Long.toString(a).length Long.toString(a) Long.toString Long a Long.toString(b).length() Long.toString(b).length Long.toString(b) Long.toString Long b long a a long b b public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	}

	private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	}
} public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	}

	private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final long N = sc.nextLong();
		long minFab = Integer.MAX_VALUE;

		for (int i = 1, cap = (int) Math.sqrt(N) + 1; i <= cap; i++) {
			long a = i;
			if (N % a == 0) {
				long b = N / i;
				minFab = Math.min(minFab, F(a, b));
			}
		}
		System.out.println(minFab);
		sc.close();
	}

	private int F(long a, long b) {
		return Math.max(Long.toString(a).length(), Long.toString(b).length());
	}
}
