import java.util.Scanner;
import static java.lang.Math.*;

class Main
{
  public static void main(String[]$) {
    long N = new Scanner(System.in).nextLong();
    int ans = 314159265;
    for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    }
    System.out.println(ans);
  }
  
  static int $(long n) {
    int cnt  = 0;
    while(n > 0) {
      n /= 10;
      ++cnt;
    }
    return cnt;
  }
} import java.util.Scanner; Scanner java.util import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; class Main
{
  public static void main(String[]$) {
    long N = new Scanner(System.in).nextLong();
    int ans = 314159265;
    for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    }
    System.out.println(ans);
  }
  
  static int $(long n) {
    int cnt  = 0;
    while(n > 0) {
      n /= 10;
      ++cnt;
    }
    return cnt;
  }
} Main public static void main(String[]$) {
    long N = new Scanner(System.in).nextLong();
    int ans = 314159265;
    for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    }
    System.out.println(ans);
  } main {
    long N = new Scanner(System.in).nextLong();
    int ans = 314159265;
    for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    }
    System.out.println(ans);
  } long N = new Scanner(System.in).nextLong(); N new Scanner(System.in).nextLong() new Scanner(System.in).nextLong new Scanner(System.in) int ans = 314159265; ans 314159265 for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    } long i = 1; long i = 1; i 1 i*i <= N i*i i i N ++i ++i i {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    } {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    } if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      } N % i == 0 N % i N i 0 {
        ans = min(ans, max($(i), $(N/i)));
      } ans = min(ans, max($(i), $(N/i))) ans min(ans, max($(i), $(N/i))) min ans max($(i), $(N/i)) max $(i) $ i $(N/i) $ N/i N i System.out.println(ans) System.out.println System.out System System.out ans String[]$ $ static int $(long n) {
    int cnt  = 0;
    while(n > 0) {
      n /= 10;
      ++cnt;
    }
    return cnt;
  } $ {
    int cnt  = 0;
    while(n > 0) {
      n /= 10;
      ++cnt;
    }
    return cnt;
  } int cnt  = 0; cnt 0 while(n > 0) {
      n /= 10;
      ++cnt;
    } n > 0 n 0 {
      n /= 10;
      ++cnt;
    } n /= 10 n 10 ++cnt cnt return cnt; cnt long n n
import java.util.Scanner;
import static java.lang.Math.*;

class Main
{
  public static void main(String[]$) {
    long N = new Scanner(System.in).nextLong();
    int ans = 314159265;
    for (long i = 1; i*i <= N; ++i) {
      if(N % i == 0) {
        ans = min(ans, max($(i), $(N/i)));
      }
    }
    System.out.println(ans);
  }
  
  static int $(long n) {
    int cnt  = 0;
    while(n > 0) {
      n /= 10;
      ++cnt;
    }
    return cnt;
  }
}