
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int ans = String.valueOf(N).length(); ans String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		} long A = 1; long A = 1; A 1 A * A <= N A * A A A N A++ A++ A {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		} {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		} if (N % A != 0) {
				continue;
			} N % A != 0 N % A N A 0 {
				continue;
			} continue; long B = N / A; B N / A N A 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 (ans > tmp) {
				ans = tmp;
			} ans > tmp ans tmp {
				ans = tmp;
			} ans = tmp ans tmp System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = String.valueOf(N).length();
		for (long A = 1; A * A <= N; A++) {
			if (N % A != 0) {
				continue;
			}
			long B = N / A;
			int tmp = Math.max(String.valueOf(A).length(), String.valueOf(B).length());
			if (ans > tmp) {
				ans = tmp;
			}
		}
		System.out.println(ans);
		sc.close();
	}
}