import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  }

  public static int digitCount(long n) {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  }

  public static int digitCount(long n) {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    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 double rootN = Math.sqrt((double)N); rootN Math.sqrt((double)N) Math.sqrt Math (double)N int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    } int i = 1; int i = 1; i 1 i <= rootN i rootN i++ i++ i {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    } {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    } if (N % i != 0) {
        continue;
      } N % i != 0 N % i N i 0 {
        continue;
      } continue; int tmp = Math.max(digitCount(i), digitCount(N / i)); tmp Math.max(digitCount(i), digitCount(N / i)) Math.max Math digitCount(i) digitCount i digitCount(N / i) digitCount N / i N i if (tmp < min) {
        min = tmp;
      } tmp < min tmp min {
        min = tmp;
      } min = tmp min tmp System.out.println(min) System.out.println System.out System System.out min String[] args args public static int digitCount(long n) {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  } digitCount {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  } int count = 0; count 0 while (n > 0) {
      count++;
      n /= 10;
    } n > 0 n 0 {
      count++;
      n /= 10;
    } count++ count n /= 10 n 10 return count; count long n n public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  }

  public static int digitCount(long n) {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  }

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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    double rootN = Math.sqrt((double)N);
    int min = Integer.MAX_VALUE;
    for (int i = 1; i <= rootN; i++) {
      if (N % i != 0) {
        continue;
      }
      int tmp = Math.max(digitCount(i), digitCount(N / i));
      if (tmp < min) {
        min = tmp;
      }
    }
    System.out.println(min);
  }

  public static int digitCount(long n) {
    int count = 0;
    while (n > 0) {
      count++;
      n /= 10;
    }
    return count;
  }
}