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

signed main() {
  int N;
  cin>>N;
  int c;
  for(int i=0;i<sqrt((double)N);i++){
    if(N%(i+1)!=0)continue;
    c=0;
    for(int j=1;N/(i+1)/j>0;j*=10) c++;
  }
  cout<<c<<endl;
}
