import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;

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

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	}
} import java.util.Scanner; Scanner java.util import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc Set<Long> x = new HashSet<>(); x new HashSet<>() for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		} long i = 1; long i = 1; i 1 i * i <= N i * i i i N i++ i++ i {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		} {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		} if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			} N % i == 0 N % i N i 0 {
				x.add(i);
				x.add(N / i);
			} x.add(i) x.add x i x.add(N / i) x.add x N / i N i int min = 100; min 100 for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		} Long i x {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		} {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		} String a = String.valueOf(i); a String.valueOf(i) String.valueOf String i String b = String.valueOf(N / i); b String.valueOf(N / i) String.valueOf String N / i N i int temp = Math.max(a.length(), b.length()); temp Math.max(a.length(), b.length()) Math.max Math a.length() a.length a b.length() b.length b min = Math.min(min, temp) min Math.min(min, temp) Math.min Math min temp System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	}
} Main
import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;

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

		Set<Long> x = new HashSet<>();
		
		for(long i = 1; i * i <= N; i++) {
			if(N % i == 0) {
				x.add(i);
				x.add(N / i);
			}
		}
		
		int min = 100;
		
		for(Long i : x) {
			String a = String.valueOf(i);
			String b = String.valueOf(N / i);
			int temp = Math.max(a.length(), b.length());
			min = Math.min(min, temp);
		}
		System.out.println(min);
	}
}
