#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main()
{
  long long int N;
  cin >> N;
  int M = sqrt(N);
  int ans;
  for(int i = 1; i <= M; i++)
    if(N%i == 0) ans = max(log10(i)+1,log10(N/i)+1);
  cout << ans << endl;
}