import java.util.Scanner;

public class Main {
//	static int cnt = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	}

	static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	}

	static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	}

} import java.util.Scanner; Scanner java.util public class Main {
//	static int cnt = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	}

	static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	}

	static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int min = 11; min 11 for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		} long a = 1; long a = 1; a 1 a * a <= n a * a a a n a++ a++ a {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		} {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = 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 = func(a, b); tmp func(a, b) func a b if (tmp < min) {
				min = tmp;
			} tmp < min tmp min {
				min = tmp;
			} min = tmp min tmp System.out.println(min) System.out.println System.out System System.out min sc.close() sc.close sc String[] args args static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	} func {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	} return Math.max(toDigit(a), toDigit(b)); Math.max(toDigit(a), toDigit(b)) Math.max Math toDigit(a) toDigit a toDigit(b) toDigit b long a a long b b static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	} toDigit {
//		cnt++;
		String str = "" + n;
		return str.length();
	} String str = "" + n; str "" + n "" n return str.length(); str.length() str.length str long n n public class Main {
//	static int cnt = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	}

	static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	}

	static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	}

} public class Main {
//	static int cnt = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	}

	static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	}

	static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	}

} Main
import java.util.Scanner;

public class Main {
//	static int cnt = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long n = sc.nextLong();
		int min = 11;
		for (long a = 1; a * a <= n; a++) {
//			cnt++;
			if (n % a != 0) {
				continue;
			}
			long b = n / a;
			int tmp = func(a, b);
			if (tmp < min) {
				min = tmp;
			}
		}
//		System.out.println("cnt:" + cnt);
		System.out.println(min);
		sc.close();
	}

	static int func(long a, long b) {
//		cnt++;
		return Math.max(toDigit(a), toDigit(b));
	}

	static int toDigit(long n) {
//		cnt++;
		String str = "" + n;
		return str.length();
	}

}
