#include <iostream>

#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define Mod 1000000007
#define eps 1e-6
#define ll long long
#define INF 0x3f3f3f3f 
#define MEM(x,y) memset(x,y,sizeof(x))
#define Maxn 100005
#define P pair<int,int>
using namespace std;
int main()
{
	ll a;
	cin >> a;
	ll max = 1;
	for (ll i = 1; i * i < a; i++)
	{
		if (a % i == 0)
		{
			max = i;
		}
	}
	ll b = a / max;
	int ans = 0;
	while (b != 0)
	{
		ans++;
		b /= 10;
	}
	cout << ans;
}








