import java.util.*;

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

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