#include<iostream>
#include<cmath>
using namespace std;
signed main(){
    //freopen("in","r",stdin);
    long long int a[123],b[123];
    int count=0;
    int index=0;
    long long int n;
    int minva=18,maxvalue;
    cin>>n;
    for(int i=1;i<=sqrt(n);i++){
        if(n%i==0){
            count++;
            a[index]=i;
            b[index]=n/i;
            index++;
        }
    }
    //cout<<count<<endl;
    //for(int i=0;i<index;i++)
        //cout<<a[i]<<" "<<b[i]<<endl;
    for(int i=0;i<index;i++){
        long long int x=a[i],y=b[i];
        int count1,count2;
        for(count1=0;x>0;x/=10)
            count1++;
        for(count2=0;y>0;y/=10)
            count2++;
        maxvalue=max(count1,count2);
        minva=min(maxvalue,minva);
        //cout<<maxvalue<<" "<<minva<<endl;
    }
    cout<<minva<<endl;
    return 0;
}