import java.util.Scanner;

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 <= Math.sqrt(n); i++) {
			if (n % i == 0 && ((n / i)+"").length() < ans) {
				ans = ((n / i) + "").length();
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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 <= Math.sqrt(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 <= Math.sqrt(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 <= Math.sqrt(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 <= Math.sqrt(n); i++) {
			if (n % i == 0 && ((n / i)+"").length() < ans) {
				ans = ((n / i) + "").length();
			}
		} long i = 1; long i = 1; i 1 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math 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 <= Math.sqrt(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 <= Math.sqrt(n); i++) {
			if (n % i == 0 && ((n / i)+"").length() < ans) {
				ans = ((n / i) + "").length();
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

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 <= Math.sqrt(n); i++) {
			if (n % i == 0 && ((n / i)+"").length() < ans) {
				ans = ((n / i) + "").length();
			}
		}
		System.out.println(ans);
	}
}