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 = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	}
	public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	}
} 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 = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	}
	public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		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 = kazoeru(N); ans kazoeru(N) kazoeru N for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		} long i = 1L; long i = 1L; i 1L i * i <= N i * i i i N i++ i++ i {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		} {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		} if(N % i != 0) {
				continue;
			} N % i != 0 N % i N i 0 {
				continue;
			} continue; long b = N / i; b N / i N i int s = Math.max(kazoeru(i), kazoeru(b)); s Math.max(kazoeru(i), kazoeru(b)) Math.max Math kazoeru(i) kazoeru i kazoeru(b) kazoeru b if(ans > s) {
				ans = s;
			} ans > s ans s {
				ans = s;
			} ans = s ans s System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	} kazoeru {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	} int ret = 1; ret 1 while(i >=10) {
			i /= 10;
			ret++;
		} i >=10 i 10 {
			i /= 10;
			ret++;
		} i /= 10 i 10 ret++ ret return ret; ret long i i public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	}
	public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		int ans = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	}
	public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	}
} 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 = kazoeru(N);
		for(long i = 1L;i * i <= N; i++) {
			if(N % i != 0) {
				continue;
			}
			long b = N / i;
			int s = Math.max(kazoeru(i), kazoeru(b));
			if(ans > s) {
				ans = s;
			}
		}
		System.out.println(ans);
	}
	public static int kazoeru(long i) {
		int ret = 1;
		while(i >=10) {
			i /= 10;
			ret++;
		}
		return ret;
	}
}
