import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	}
} 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 sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	} main {
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc int sq = (int) Math.floor(Math.sqrt((double)N)); sq (int) Math.floor(Math.sqrt((double)N)) Math.floor Math Math.sqrt((double)N) Math.sqrt Math (double)N for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        } int i = sq; int i = sq; i sq i > 0 i 0 i-- i-- i {
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        } {
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        } if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            } N%i==0 N%i N i 0 {
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            } if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              } i>(N/i) i (N/i) N i {
                System.out.println(String.valueOf(i).length());
                return;
              } System.out.println(String.valueOf(i).length()) System.out.println System.out System System.out String.valueOf(i).length() String.valueOf(i).length String.valueOf(i) String.valueOf String i return; {
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              } Long ans = (long) (N/i); ans (long) (N/i) N i System.out.println(String.valueOf(ans).length()) System.out.println System.out System System.out String.valueOf(ans).length() String.valueOf(ans).length String.valueOf(ans) String.valueOf String ans return; System.out.println(String.valueOf(N).length()) System.out.println System.out System System.out String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long N = sc.nextLong();
      
        int sq = (int) Math.floor(Math.sqrt((double)N));
      	for(int i = sq; i > 0; i--){
          	if(N%i==0){
              if(i>(N/i)){
                System.out.println(String.valueOf(i).length());
                return;
              }else{
                Long ans = (long) (N/i);
                System.out.println(String.valueOf(ans).length());
                return;
              }
            }
        }
		System.out.println(String.valueOf(N).length());
	}
}
