import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc int ans = Long.toString(n).length(); ans Long.toString(n).length() Long.toString(n).length Long.toString(n) Long.toString Long n for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    } {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    } if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      } n % i == 0 n % i n i 0 {
        ans = Math.min(Long.toString(n / i).length(), ans);
      } ans = Math.min(Long.toString(n / i).length(), ans) ans Math.min(Long.toString(n / i).length(), ans) Math.min Math Long.toString(n / i).length() Long.toString(n / i).length Long.toString(n / i) Long.toString Long n / i n i ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = Long.toString(n).length();

    for (long i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        ans = Math.min(Long.toString(n / i).length(), ans);
      }
    }
    System.out.println(ans);
  }
}
