
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 = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	}
} 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 = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		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 = (int)Math.log10(n)+1; ans (int)Math.log10(n)+1 (int)Math.log10(n) Math.log10 Math n 1 for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		} int i=1; int i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		} {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		} if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1); n%i ==0 n%i n i 0 ans = (int)Math.min(ans, Math.log10(n/i)+1) ans (int)Math.min(ans, Math.log10(n/i)+1) Math.min Math ans Math.log10(n/i)+1 Math.log10(n/i) Math.log10 Math n/i n i 1 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) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int ans = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	}
} 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 = (int)Math.log10(n)+1;
		for(int i=1; i<=Math.sqrt(n); i++) {
			if(n%i ==0) ans = (int)Math.min(ans, Math.log10(n/i)+1);
		}
		System.out.println(ans);
	}
}
