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();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	}
} 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();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(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 sc.close() sc.close sc long ans = 11; ans 11 long end = (long) Math.sqrt(n); end (long) Math.sqrt(n) Math.sqrt Math n for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		} int i = 1; int i = 1; i 1 i <= end i end i++ i++ i {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		} {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		} if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			} n % i == 0 n % i n i 0 {
				ans = Math.min(ans, String.valueOf(n / i).length());
			} ans = Math.min(ans, String.valueOf(n / i).length()) ans Math.min(ans, String.valueOf(n / i).length()) Math.min Math ans String.valueOf(n / i).length() String.valueOf(n / i).length String.valueOf(n / i) String.valueOf String 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) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	}
} 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();
		sc.close();

		long ans = 11;
		long end = (long) Math.sqrt(n);
		for (int i = 1; i <= end; i++) {
			if (n % i == 0) {
				ans = Math.min(ans, String.valueOf(n / i).length());
			}
		}
		System.out.println(ans);
	}
}
