
import java.io.PrintWriter;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	}
}
 import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long M = (long) Math.sqrt(N); M (long) Math.sqrt(N) Math.sqrt Math N int tmp=1; tmp 1 for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		} int i=1; int i=1; i 1 i<=(int)M i (int)M i++ i++ i {
			if(N%i==0){
				tmp = i;
			}
		} {
			if(N%i==0){
				tmp = i;
			}
		} if(N%i==0){
				tmp = i;
			} N%i==0 N%i N i 0 {
				tmp = i;
			} tmp = i tmp i long r = Math.max(tmp,N/tmp); r Math.max(tmp,N/tmp) Math.max Math tmp N/tmp N tmp int count = 0; count 0 while(r>0){
			r /= 10;
			count ++ ;
		} r>0 r 0 {
			r /= 10;
			count ++ ;
		} r /= 10 r 10 count ++ count out.println(count) out.println out count sc.close() sc.close sc out.flush() out.flush out String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	}
} Main

import java.io.PrintWriter;
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long N = Long.parseLong(sc.next());
		long M = (long) Math.sqrt(N);
		int tmp=1;
		for(int i=1;i<=(int)M;i++){
			if(N%i==0){
				tmp = i;
			}
		}
		long r = Math.max(tmp,N/tmp);
		int count = 0;
		while(r>0){
			r /= 10;
			count ++ ;
		}
		out.println(count);

	sc.close();
	out.flush();
	}
}

