import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	}

	private static int length(long num) {
		return Long.toString(num).length();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	}

	private static int length(long num) {
		return Long.toString(num).length();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	} main {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner long num = Long.parseLong(input); num Long.parseLong(input) Long.parseLong Long input int range = (int) Math.pow(10, (input.length() + 1) / 2); range (int) Math.pow(10, (input.length() + 1) / 2) Math.pow Math 10 (input.length() + 1) / 2 (input.length() + 1) input.length() input.length input 1 2 int result = 100; result 100 for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		} int i = 1; int i = 1; i 1 i < range i range i++ i++ i {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		} {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		} if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			} num % i == 0 num % i num i 0 {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			} int candidate = Math.max(length(i), length(num / i)); candidate Math.max(length(i), length(num / i)) Math.max Math length(i) length i length(num / i) length num / i num i if (candidate < result) result = candidate; candidate < result candidate result result = candidate result candidate System.out.println(result) System.out.println System.out System System.out result String[] args args private static int length(long num) {
		return Long.toString(num).length();
	} length {
		return Long.toString(num).length();
	} return Long.toString(num).length(); Long.toString(num).length() Long.toString(num).length Long.toString(num) Long.toString Long num long num num public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	}

	private static int length(long num) {
		return Long.toString(num).length();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	}

	private static int length(long num) {
		return Long.toString(num).length();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String input = scanner.nextLine();
		long num = Long.parseLong(input);
		int range = (int) Math.pow(10, (input.length() + 1) / 2);
		int result = 100;
		for (int i = 1; i < range; i++) {
			if (num % i == 0) {
				int candidate = Math.max(length(i), length(num / i));
				if (candidate < result) result = candidate;
			}
		}
		System.out.println(result);
	}

	private static int length(long num) {
		return Long.toString(num).length();
	}
}
