//-----------------------------------------------------------
// すぐ使える
//-----------------------------------------------------------
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    }

}

//-----------------------------------------------------------
//-----------------------------------------------------------
 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    }

} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) long N = Long.parseLong(br.readLine()); N Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br long a=0; a 0 long b=0; b 0 a = (long)Math.floor(Math.sqrt(N)) a (long)Math.floor(Math.sqrt(N)) Math.floor Math Math.sqrt(N) Math.sqrt Math N for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		} long i=0; long i=0; i 0 i < N i N i++ i++ i {
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		} {
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		} if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			} N % a == 0 N % a N a 0 {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} b = N / a b N / a N a break; {
				a -= 1;
			} a -= 1 a 1 long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length()); ans Math.max(String.valueOf(a).length(), String.valueOf(b).length()) Math.max Math String.valueOf(a).length() String.valueOf(a).length String.valueOf(a) String.valueOf String a String.valueOf(b).length() String.valueOf(b).length String.valueOf(b) String.valueOf String b System.out.println(ans) System.out.println System.out System System.out ans return; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    }

} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    }

} Main
//-----------------------------------------------------------
// すぐ使える
//-----------------------------------------------------------
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
		// 1行目数字、2行目文字
		long N = Long.parseLong(br.readLine());

		long a=0;
		long b=0;
		
		a = (long)Math.floor(Math.sqrt(N));
		for(long i=0; i < N; i++){
			if( N % a == 0 ) {
				//割り切れたら、そこで比べる
				b = N / a;
				break;
			} else {
				a -= 1;
			}
		}
		
		long ans = Math.max(String.valueOf(a).length(), String.valueOf(b).length());

		//System.out.println(ans + ", a=["+a+"], b=["+b+"]");
		System.out.println(ans);
		return;
    }

}

//-----------------------------------------------------------
//-----------------------------------------------------------

