import java.util.*;

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