import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long sq=(long)(Math.sqrt(n)+0.0001);
		while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		}
		System.out.println((int)Math.log10(n/sq)+1);
	}

} import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long sq=(long)(Math.sqrt(n)+0.0001);
		while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		}
		System.out.println((int)Math.log10(n/sq)+1);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long sq=(long)(Math.sqrt(n)+0.0001);
		while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		}
		System.out.println((int)Math.log10(n/sq)+1);
	} main {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long sq=(long)(Math.sqrt(n)+0.0001);
		while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		}
		System.out.println((int)Math.log10(n/sq)+1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long sq=(long)(Math.sqrt(n)+0.0001); sq (long)(Math.sqrt(n)+0.0001) Math.sqrt(n) Math.sqrt Math n 0.0001 while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		} true {
			if(n%sq==0){
				break;
			}
			sq--;
		} if(n%sq==0){
				break;
			} n%sq==0 n%sq n sq 0 {
				break;
			} break; sq-- sq System.out.println((int)Math.log10(n/sq)+1) System.out.println System.out System System.out (int)Math.log10(n/sq)+1 (int)Math.log10(n/sq) Math.log10 Math n/sq n sq 1 String[] args args
import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n=sc.nextLong();
		long sq=(long)(Math.sqrt(n)+0.0001);
		while(true){
			if(n%sq==0){
				break;
			}
			sq--;
		}
		System.out.println((int)Math.log10(n/sq)+1);
	}

}