import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	}
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	} main {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long ans = 0; ans 0 for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		} long i=1; long i=1; i 1 i*i<=N i*i i i N i++ i++ i {
			if( N%i==0 ){
				ans = N/i;
			}
		} {
			if( N%i==0 ){
				ans = N/i;
			}
		} if( N%i==0 ){
				ans = N/i;
			} N%i==0 N%i N i 0 {
				ans = N/i;
			} ans = N/i ans N/i N i String ss = String.valueOf(ans); ss String.valueOf(ans) String.valueOf String ans System.out.println(ss.length()) System.out.println System.out System System.out ss.length() ss.length ss String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	}
} Main
import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long ans = 0;
		for( long i=1; i*i<=N; i++ ){
			if( N%i==0 ){
				ans = N/i;
			}
		}
		String ss = String.valueOf(ans);
		System.out.println(ss.length());
	}
}
