#import <stdio.h>
double sqrt(double x) {
    double         xHalf = 0.5 * x;
    long long int  tmp   = 0x5FE6EB50C7B537AAl - ( *(long long int*)&x >> 1);//initial guess
    double         xRes  = * (double*)&tmp;
    
    xRes *= ( 1.5 - ( xHalf * xRes * xRes ) );
    xRes *= ( 1.5 - ( xHalf * xRes * xRes ) );
    xRes *= ( 1.5 - ( xHalf * xRes * xRes ) );
    xRes *= ( 1.5 - ( xHalf * xRes * xRes ) );
    return xRes * x;
}
double fceil(double x) {
    long inum = (long)x;
    return inum + (((x != inum) && (x > 0)) ? 1 : 0);
}

typedef long long INT;
int main(){
    INT n;
    scanf("%lld",&n);
    INT p = fceil(sqrt((double)n));
    for(;p<=n;p++) {
        if (n%p==0) {
            char s[20];
            sprintf(s, "%lld", p);
            printf("%lu", strlen(s));
            return 0;
        }
    }
}
