#include <bits/stdc++.h>
using namespace std;
 
int main(){
  long N,A;
  int ans=0;
  cin>>N;
  for(long i=(long)sqrt(N);i>0;i--){
      if(N%i==0){
        A=N/i;
        while(A!=0){
      		ans++;
      		A=A/10;
    	}
        break;
      }
  }
  cout<<ans<<endl;
}