import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  }
} 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();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans = 11; ans 11 for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    } int i = 1; int i = 1; i 1 i <= Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n i++ i++ i {
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    } {
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    } if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      } n%i == 0 n%i n i 0 {
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      } long j= n/i; j n/i n i int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length()); temp Math.max(String.valueOf(i).length(),String.valueOf(j).length()) Math.max Math String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i String.valueOf(j).length() String.valueOf(j).length String.valueOf(j) String.valueOf String j if(temp < ans){
          ans = temp;
        } temp < ans temp ans {
          ans = temp;
        } ans = temp ans temp System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = 11;
    for(int i = 1; i <= Math.sqrt(n); i++){
      if(n%i == 0){
        long j= n/i;
        int temp = Math.max(String.valueOf(i).length(),String.valueOf(j).length());
        if(temp < ans){
          ans = temp;
        }
      }
    }
    System.out.println(ans);
  }
}