#include <iostream>
using namespace std;

int main(){
	long long n, ans = 1e9;
	cin >> n;
	for(long long a = 1; a * a <= n; a++) if(n % a == 0){
		ans = min(ans, (long long)(to_string(n / a).size()));
	}
	cout << ans << endl;
}