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());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	}
} 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());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = Long.parseLong(sc.next());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = Long.parseLong(sc.next());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	} 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 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		} long a = 1; long a = 1; a 1 a <= Math.sqrt(n) a Math.sqrt(n) Math.sqrt Math n a++ a++ a {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		} {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		} if (n % a != 0)
				continue; n % a != 0 n % a n a 0 continue; int l = String.valueOf(n / a).length(); l String.valueOf(n / a).length() String.valueOf(n / a).length String.valueOf(n / a) String.valueOf String n / a n a if (l < min)
				min = l; l < min l min min = l min l System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = Long.parseLong(sc.next());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = Long.parseLong(sc.next());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	}
} 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());
		int min = Integer.MAX_VALUE;
		for (long a = 1; a <= Math.sqrt(n); a++) {
			if (n % a != 0)
				continue;
			int l = String.valueOf(n / a).length();
			if (l < min)
				min = l;
		}
		System.out.println(min);
	}
}