import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int ans = (N+"").length(); ans (N+"").length() (N+"").length (N+"") N "" for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		} long i = 1; long i = 1; i 1 i * i <= N i * i i i N i++ i++ i {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		} {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		} if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			} N % i == 0 && ((N/i)+"").length() < ans N % i == 0 N % i N i 0 ((N/i)+"").length() < ans ((N/i)+"").length() ((N/i)+"").length ((N/i)+"") (N/i) N i "" ans {
				ans = ((N/i)+"").length();
			} ans = ((N/i)+"").length() ans ((N/i)+"").length() ((N/i)+"").length ((N/i)+"") (N/i) N i "" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = (N+"").length();
		for (long i = 1; i * i <= N; i++) {
			if (N % i == 0 && ((N/i)+"").length() < ans) {
				ans = ((N/i)+"").length();
			}
		}
		System.out.println(ans);
	}
}
