import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  }
  private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util 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();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  }
  private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc sc.close() sc.close sc List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    } long i=1; long i=1; i 1 i<=Math.sqrt((double)n) i Math.sqrt((double)n) Math.sqrt Math (double)n i++ i++ i {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    } {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    } if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	} n%i == 0 n%i n i 0 {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	} if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	} !list.contains(f(i,n/i)) list.contains(f(i,n/i)) list.contains list f(i,n/i) f i n/i n i {
        		list.add(f(i,n/i));
        	} list.add(f(i,n/i)) list.add list f(i,n/i) f i n/i n i Collections.sort(list) Collections.sort Collections list System.out.println(list.get(0)) System.out.println System.out System System.out list.get(0) list.get list 0 String[] args args private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  } f {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  } return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1); Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1) Math.max Math (int)(Math.log10(a))+1 (int)(Math.log10(a)) Math.log10 Math a 1 (int)(Math.log10(b))+1 (int)(Math.log10(b)) Math.log10 Math b 1 long a a long b b public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  }
  private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  }
  private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  }
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    sc.close();
    List<Integer> list = new ArrayList<Integer>();
    for(long i=1;i<=Math.sqrt((double)n);i++) {
    	if(n%i == 0) {
        	if(!list.contains(f(i,n/i))) {
        		list.add(f(i,n/i));
        	}
    	}
    }
    Collections.sort(list);
    System.out.println(list.get(0));
  }
  private static int f(long a, long b) {
	  return Math.max((int)(Math.log10(a))+1, (int)(Math.log10(b))+1);
  }
}