import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	}
} 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();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	} main {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long k  = n; k n int countn = 1; countn 1 while(k >= 10) {
			k = k /10;
			countn++;
		} k >= 10 k 10 {
			k = k /10;
			countn++;
		} k = k /10 k k /10 k 10 countn++ countn int min = countn ; min countn for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	} long i = 1; long i = 1; i 1 i < n i n i++ i++ i {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	} {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	} int dig = 1; dig 1 long j = n / i; j n / i n i if(i > j)  break; i > j i j break; if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		} n % i == 0 n % i n i 0 {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		} long jj = j; jj j while(jj >= 10) {
				dig++;
				jj = jj /10;
			} jj >= 10 jj 10 {
				dig++;
				jj = jj /10;
			} dig++ dig jj = jj /10 jj jj /10 jj 10 min = Math.min(dig, min) min Math.min(dig, min) Math.min Math dig min System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

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

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		long k  = n;
		int countn = 1;
		while(k >= 10) {
			k = k /10;
			countn++;
		}
		int min = countn ;

		for( long i = 1; i < n; i++) {
		 int dig = 1;
		 long j = n / i;
		 
		 if(i > j)  break;
		 
		 if(n % i == 0) {
			 long jj = j;
			while(jj >= 10) {
				dig++;
				jj = jj /10;
			}
			min = Math.min(dig, min);
		}
	}
		System.out.println(min);

	}
}
