import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    }
} Main public static void main(String[] args) {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    } main {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    } Scanner scanner =new Scanner(System.in); scanner new Scanner(System.in) long num = Long.parseLong(scanner.nextLine()); num Long.parseLong(scanner.nextLine()) Long.parseLong Long scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner long numsPiv = (long)Math.sqrt(num); numsPiv (long)Math.sqrt(num) Math.sqrt Math num int min = 100; min 100 for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	} long i = 1; long i = 1; i 1 i <= numsPiv i numsPiv i++ i++ i {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	} {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	} int aLen = 0; aLen 0 int bLen = 0; bLen 0 long a = 0; a 0 long b = 0; b 0 if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		} num % i == 0 num % i num i 0 {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		} a = i a i b = num / i b num / i num i while(a > 0){
                a = a / 10;
				aLen++;
              } a > 0 a 0 {
                a = a / 10;
				aLen++;
              } a = a / 10 a a / 10 a 10 aLen++ aLen while(b > 0){
                b = b / 10;
				bLen++;
              } b > 0 b 0 {
                b = b / 10;
				bLen++;
              } b = b / 10 b b / 10 b 10 bLen++ bLen if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              } aLen >= bLen && min > aLen aLen >= bLen aLen bLen min > aLen min aLen {
                min = aLen;
			} min = aLen min aLen if(aLen < bLen && min > bLen){
                min = bLen;
              } aLen < bLen && min > bLen aLen < bLen aLen bLen min > bLen min bLen {
                min = bLen;
              } min = bLen min bLen 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 scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    }
} public class Main {

	public static void main(String[] args) {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    }
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner =new Scanner(System.in);
		long num = Long.parseLong(scanner.nextLine());
		scanner.close();

		long numsPiv = (long)Math.sqrt(num);
      
      	int min = 100;
      
		for (long i = 1; i <= numsPiv; i++) {
          	int aLen = 0;
          	int bLen = 0;
          	long a = 0;
           long b = 0;
			if (num % i == 0) {
              a = i;
              b = num / i;
              while(a > 0){
                a = a / 10;
				aLen++;
              }
              
              while(b > 0){
                b = b / 10;
				bLen++;
              }
              if(aLen >= bLen && min > aLen){
                min = aLen;
			}else if(aLen < bLen && min > bLen){
                min = bLen;
              }
		}
	}
      System.out.println(min);
    }
}