import java.io.*;
import java.util.*;

class Main {
  public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long min = 100000000;
    for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    }
    System.out.println(min);
  }
} import java.io.*; io.* java import java.util.*; util.* java class Main {
  public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long min = 100000000;
    for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    }
    System.out.println(min);
  }
} Main public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long min = 100000000;
    for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    }
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long min = 100000000;
    for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    }
    System.out.println(min);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long min = 100000000; min 100000000 for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    } long i = 1; long i = 1; i 1 i*i <= n i*i i i n i++ i++ i {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    } {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    } if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      } n % i == 0 n % i n i 0 {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      } long j = n/i; j n/i n i int F = Math.max(Long.toString(i).length(), Long.toString(j).length()); F Math.max(Long.toString(i).length(), Long.toString(j).length()) Math.max Math Long.toString(i).length() Long.toString(i).length Long.toString(i) Long.toString Long i Long.toString(j).length() Long.toString(j).length Long.toString(j) Long.toString Long j min = Math.min(min, F) min Math.min(min, F) Math.min Math min F System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.io.*;
import java.util.*;

class Main {
  public static void main (String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long min = 100000000;
    for(long i = 1; i*i <= n; i++) {
      if(n % i == 0) {
        long j = n/i;
        int F = Math.max(Long.toString(i).length(), Long.toString(j).length());
        min = Math.min(min, F);
      }
    }
    System.out.println(min);
  }
}
