import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  }

  private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  }
} 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 minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  }

  private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  }
} Main public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  } main { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int minLen = Integer.MAX_VALUE; minLen Integer.MAX_VALUE Integer Integer.MAX_VALUE for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      } {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      } if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i))); n % i == 0 n % i n i 0 minLen = Math.min(minLen, calDigit(Math.max(i, n / i))) minLen Math.min(minLen, calDigit(Math.max(i, n / i))) Math.min Math minLen calDigit(Math.max(i, n / i)) calDigit Math.max(i, n / i) Math.max Math i n / i n i System.out.println(minLen) System.out.println System.out System System.out minLen String[] args args private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  } calDigit {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  } int cnt = 0; cnt 0 while(n > 0) {
      cnt++;
      n /= 10;
    } n > 0 n 0 {
      cnt++;
      n /= 10;
    } cnt++ cnt n /= 10 n 10 return cnt; cnt long n n public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  }

  private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  }

  private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  }
} Main
import java.util.*;
public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      long n = sc.nextLong();
      int minLen = Integer.MAX_VALUE;
      for(long i = 1; i * i <= n; i++) {
        if(n % i == 0)
          minLen = Math.min(minLen, calDigit(Math.max(i, n / i)));
      }
      System.out.println(minLen);
  }

  private static int calDigit(long n) {
    int cnt = 0;
    while(n > 0) {
      cnt++;
      n /= 10;
    }
    return cnt;
  }
}