#include<iostream>
#include<math.h>
using namespace std;

int main(){
	long long n;	
	long long tmp;
	
	cin >> n;
	for(int i=1;i<=sqrt(n);i++)
		if(n%i==0)tmp = i;
	tmp = n / tmp;
	int ans = 0;
	while(tmp>0){
		tmp /= 10;
		ans++;
	}
	cout << ans << endl;
}