import java.util.Scanner;

public class Main {

    static long fanc(long a, long b) {
        long fa = 0, fb = 0;
        while(a != 0) {
            a /= 10;
            fa++;
        }
        while(b != 0) {
            b /= 10;
            fb++;
        }
        return ((fa < fb) ? fb : fa);
    }

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

        long N = scan.nextLong();
        long a,b,min = N;

        for(a = 1; a <= Math.sqrt(N); a++) {
            if(N%a!=0) {
                continue;
            }
            b = N/a;
            min = (min < fanc(a, b) ? min : fanc(a, b));
            //System.out.println(a + " " + b + " " + min);
        }

        System.out.println(min);
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz