import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  }

  private static int numDigits(long n) {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  }

  private static int numDigits(long n) {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  } main {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int min = 11; min 11 long N = scanner.nextLong(); N scanner.nextLong() scanner.nextLong scanner for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    } long a = 1; long a = 1; a 1 a * a <= N a * a a a N a++ a++ a {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    } {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    } if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      } N % a == 0 N % a N a 0 {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      } long b = N / a; b N / a N a min = Math.min(min, numDigits(b)) min Math.min(min, numDigits(b)) Math.min Math min numDigits(b) numDigits b System.out.println(min) System.out.println System.out System System.out min String[] args args private static int numDigits(long n) {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  } numDigits {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  } int i = 0; i 0 while (n > 0) {
      n /= 10;
      i++;
    } n > 0 n 0 {
      n /= 10;
      i++;
    } n /= 10 n 10 i++ i return i; i long n n public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  }

  private static int numDigits(long n) {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  }

  private static int numDigits(long n) {
    int i = 0;
    while (n > 0) {
      n /= 10;
      i++;
    }
    return i;
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    int min = 11;
    long N = scanner.nextLong();
    for (long a = 1; a * a <= N; a++) {
      if (N % a == 0) {
        long b = N / a;
        min = Math.min(min, numDigits(b));
      }
    }
    System.out.println(min);
  }

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