import java.util.ArrayList;
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();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  }
	public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	}
}
 import java.util.ArrayList; ArrayList 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();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  }
	public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	}
} Main public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long n=sc.nextLong();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  } main {
	  Scanner sc = new Scanner(System.in);
	  long n=sc.nextLong();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc List<Long> l=divisorEnum(n); l divisorEnum(n) divisorEnum n long res=0; res 0 if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  } l.size()%2==0 l.size()%2 l.size() l.size l 2 0 {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  } String s1=String.valueOf(l.get(l.size()/2)); s1 String.valueOf(l.get(l.size()/2)) String.valueOf String l.get(l.size()/2) l.get l l.size()/2 l.size() l.size l 2 String s2=String.valueOf(l.get(l.size()/2-1)); s2 String.valueOf(l.get(l.size()/2-1)) String.valueOf String l.get(l.size()/2-1) l.get l l.size()/2-1 l.size()/2 l.size() l.size l 2 1 res=Math.max(s1.length(), s2.length()) res Math.max(s1.length(), s2.length()) Math.max Math s1.length() s1.length s1 s2.length() s2.length s2 {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  } String s=String.valueOf(l.get(l.size()/2)); s String.valueOf(l.get(l.size()/2)) String.valueOf String l.get(l.size()/2) l.get l l.size()/2 l.size() l.size l 2 res=s.length() res s.length() s.length s System.out.println(res) System.out.println System.out System System.out res String[] args args public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	} divisorEnum {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	} List<Long> l=new ArrayList<>(); l new ArrayList<>() for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		} long i=1; long i=1; i 1 i<=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		} {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		} if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			} n%i==0 n%i n i 0 {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			} l.add(i) l.add l i if(i!=Math.sqrt(n))l.add(n/i); i!=Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n l.add(n/i) l.add l n/i n i l.sort(null) l.sort l null return l; l long n n public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long n=sc.nextLong();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  }
	public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	}
} public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long n=sc.nextLong();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  }
	public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	}
} Main
import java.util.ArrayList;
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();
	  List<Long> l=divisorEnum(n);
	  long res=0;
	  if(l.size()%2==0) {
		 String s1=String.valueOf(l.get(l.size()/2));
		 String s2=String.valueOf(l.get(l.size()/2-1));
		 res=Math.max(s1.length(), s2.length());
	  }else {
		  String s=String.valueOf(l.get(l.size()/2));
		  res=s.length();
	  }
	  System.out.println(res);

  }
	public static List<Long> divisorEnum(long n) {
		List<Long> l=new ArrayList<>();
		for(long i=1;i<=Math.sqrt(n);i++) {
			if(n%i==0) {
				l.add(i);
				if(i!=Math.sqrt(n))l.add(n/i);
			}
		}
		l.sort(null);
		return l;
	}
}

