import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    }
    static int F(long A,long B){
        return max(get(A),get(B));
    }
    static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    }
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    }
    static int F(long A,long B){
        return max(get(A),get(B));
    }
    static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    }
} Main public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    } main {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    } Scanner sc = new Scanner(in); sc new Scanner(in) long n=sc.nextLong(); n sc.nextLong() sc.nextLong sc long s=(long)sqrt(n)+1; s (long)sqrt(n)+1 (long)sqrt(n) sqrt n 1 int ans=100; ans 100 for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        } long i = 1; long i = 1; i 1 i <= s i s i++ i++ i {
            if(n%i==0)ans=min(F(i,n/i),ans);
        } {
            if(n%i==0)ans=min(F(i,n/i),ans);
        } if(n%i==0)ans=min(F(i,n/i),ans); n%i==0 n%i n i 0 ans=min(F(i,n/i),ans) ans min(F(i,n/i),ans) min F(i,n/i) F i n/i n i ans out.println(ans) out.println out ans String[] $ $ static int F(long A,long B){
        return max(get(A),get(B));
    } F {
        return max(get(A),get(B));
    } return max(get(A),get(B)); max(get(A),get(B)) max get(A) get A get(B) get B long A A long B B static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    } get {
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    } int c=1; c 1 while (n/10>0){
            c++;
            n/=10;
        } n/10>0 n/10 n 10 0 {
            c++;
            n/=10;
        } c++ c n/=10 n 10 return c; c long n n public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    }
    static int F(long A,long B){
        return max(get(A),get(B));
    }
    static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    }
} public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    }
    static int F(long A,long B){
        return max(get(A),get(B));
    }
    static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    }
} Main
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        Scanner sc = new Scanner(in);
        long n=sc.nextLong();
        long s=(long)sqrt(n)+1;
        int ans=100;
        for (long i = 1; i <= s; i++) {
            if(n%i==0)ans=min(F(i,n/i),ans);
        }
        out.println(ans);
    }
    static int F(long A,long B){
        return max(get(A),get(B));
    }
    static int get(long n){
        int c=1;
        while (n/10>0){
            c++;
            n/=10;
        }
        return c;
    }
}