import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  }
  public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  }
  public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  } main {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long min = 100; min 100 for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    } 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){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    } {
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    } if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      } N%i == 0 N%i N i 0 {
        long A = calc(i, N/i);
        min = A < min ? A : min;
      } long A = calc(i, N/i); A calc(i, N/i) calc i N/i N i min = A < min ? A : min min A < min ? A : min A < min A min A min System.out.println(min) System.out.println System.out System System.out min String[]args args public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  } calc {
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  } if(A < B){
      return calc(B, A);
    } A < B A B {
      return calc(B, A);
    } return calc(B, A); calc(B, A) calc B A int ans = 1; ans 1 while(A/10 != 0){
      A /= 10;
      ans++;
    } A/10 != 0 A/10 A 10 0 {
      A /= 10;
      ans++;
    } A /= 10 A 10 ans++ ans return ans; ans long A A long B B public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  }
  public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  }
  public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long min = 100;
    for(long i = 1; i <= Math.sqrt(N); i++){
      if(N%i == 0){
        long A = calc(i, N/i);
        min = A < min ? A : min;
      }
    }
    System.out.println(min);
  }
  public static long calc(long A, long B){
    if(A < B){
      return calc(B, A);
    }
    int ans = 1;
    while(A/10 != 0){
      A /= 10;
      ans++;
    }
    return ans;
  }
}