import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	}
} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	} main {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) long n = Long.parseLong(scn.next()); n Long.parseLong(scn.next()) Long.parseLong Long scn.next() scn.next scn scn.close() scn.close scn double value = Math.sqrt(n); value Math.sqrt(n) Math.sqrt Math n long i = (long) value; i (long) value for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		} ; i >= 1 i 1 i-- i-- i {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		} {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		} if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			} n % i == 0 n % i n i 0 {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			} System.out.println((long) (Math.log10(n / i) + 1)) System.out.println System.out System System.out (long) (Math.log10(n / i) + 1) Math.log10(n / i) Math.log10 Math n / i n i 1 return; String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	}
} public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n = Long.parseLong(scn.next());
		scn.close();

		double value = Math.sqrt(n);

		long i = (long) value;
		for (; i >= 1; i--) {
			if (n % i == 0) {
				System.out.println((long) (Math.log10(n / i) + 1));
				return;
			}
		}

	}
}
