import java.util.*;

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

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