import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    } main {
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextLong(); N scan.nextLong() scan.nextLong scan int F = -1; F -1 1 for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	} 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){
		F = String.valueOf(N/i).length();
	    }
	} {
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	} if(N % i == 0){
		F = String.valueOf(N/i).length();
	    } N % i == 0 N % i N i 0 {
		F = String.valueOf(N/i).length();
	    } F = String.valueOf(N/i).length() F String.valueOf(N/i).length() String.valueOf(N/i).length String.valueOf(N/i) String.valueOf String N/i N i System.out.println(F) System.out.println System.out System System.out F String[] args args public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    }
} public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	long N = scan.nextLong();
	int F = -1;
	for(int i = 1; i <= Math.sqrt(N); i++){
	    if(N % i == 0){
		F = String.valueOf(N/i).length();
	    }
	}

	System.out.println(F);
    }
}
