import java.util.*;

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

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  }

  public static int digit(long l) {
    return String.format("%d", l).length();
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long N = in.nextLong();

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  }

  public static int digit(long l) {
    return String.format("%d", l).length();
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long N = in.nextLong();

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  } main {
    Scanner in = new Scanner(System.in);
    long N = in.nextLong();

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) long N = in.nextLong(); N in.nextLong() in.nextLong in int ans = digit(N); ans digit(N) digit N for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    } long i = 1; long i = 1; i 1 i <= Math.sqrt(N) i Math.sqrt(N) Math.sqrt Math N i++ i++ i {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    } {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    } if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      } N % i == 0 N % i N i 0 {
        ans = Math.min(ans, digit(N / i));
      } ans = Math.min(ans, digit(N / i)) ans Math.min(ans, digit(N / i)) Math.min Math ans digit(N / i) digit N / i N i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int digit(long l) {
    return String.format("%d", l).length();
  } digit {
    return String.format("%d", l).length();
  } return String.format("%d", l).length(); String.format("%d", l).length() String.format("%d", l).length String.format("%d", l) String.format String "%d" l long l l public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long N = in.nextLong();

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  }

  public static int digit(long l) {
    return String.format("%d", l).length();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long N = in.nextLong();

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  }

  public static int digit(long l) {
    return String.format("%d", l).length();
  }
} Main
import java.util.*;

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

    int ans = digit(N);
    for (long i = 1; i <= Math.sqrt(N); i++) {
      if (N % i == 0) {
        ans = Math.min(ans, digit(N / i));
      }
    }

    System.out.println(ans);
  }

  public static int digit(long l) {
    return String.format("%d", l).length();
  }
}