import java.util.*;

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

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

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

      long n = sc.nextLong();
      int ans = 0;
      long a = 0;
      long i;
      long j = 0;
      for(i = 1; i*i <= n; i++){
	    if(n % i == 0){
		a = (int) (n / i);
		j = i;
	    }
	}
      
	int p = String.valueOf(a).length();
	int q = String.valueOf(j).length();
	if(p < q){
		System.out.println(q);
	}else{
		System.out.println(p);
	}    
    
  } main {
     Scanner sc = new Scanner(System.in);              

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

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

      long n = sc.nextLong();
      int ans = 0;
      long a = 0;
      long i;
      long j = 0;
      for(i = 1; i*i <= n; i++){
	    if(n % i == 0){
		a = (int) (n / i);
		j = i;
	    }
	}
      
	int p = String.valueOf(a).length();
	int q = String.valueOf(j).length();
	if(p < q){
		System.out.println(q);
	}else{
		System.out.println(p);
	}    
    
  }   
} Main
import java.util.*;

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

      long n = sc.nextLong();
      int ans = 0;
      long a = 0;
      long i;
      long j = 0;
      for(i = 1; i*i <= n; i++){
	    if(n % i == 0){
		a = (int) (n / i);
		j = i;
	    }
	}
      
	int p = String.valueOf(a).length();
	int q = String.valueOf(j).length();
	if(p < q){
		System.out.println(q);
	}else{
		System.out.println(p);
	}    
    
  }   
}
