#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

int cal(ll x)
{
    int res = 0;
    while(x){
        res++;
        x/=10;
    }
    return res;
}

int main()
{
    ll n;
    scanf("%lld",&n);
    int ans = 20;
    for(int i=1;1LL*i*i<=n;i++){
        if(n%i==0) ans = min(ans,cal(n/i));
    }
    printf("%d\n",ans);
    
}
