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 = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    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 = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    int ans = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    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 = String.valueOf(n).length(); ans String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    } long i = 1; long i = 1; i 1 i * i <= n i * i i i n i++ i++ i {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    } {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    } final int length = String.valueOf(n / i).length(); length String.valueOf(n / i).length() String.valueOf(n / i).length String.valueOf(n / i) String.valueOf String n / i n i if (n % i == 0 && length < ans) {
        ans = length;
      } n % i == 0 && length < ans n % i == 0 n % i n i 0 length < ans length ans {
        ans = length;
      } ans = length ans length 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 = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    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 = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    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 = String.valueOf(n).length();
    
    for (long i = 1; i * i <= n; i++) {
      final int length = String.valueOf(n / i).length();
      if (n % i == 0 && length < ans) {
        ans = length;
      }
    }
    System.out.println(ans);
  }
}
