#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1);
long long n;
int f(long long s) {
  int i = 0;
  while (s >= 1) {
    i++;
    s /= 10;
  }
  return i;
}
int main() {
  while (cin >> n) {
    if (n > 1000000) {
      cout << f(n) << endl;
      continue;
    }
    int s = sqrt(n * 1.0);
    while (s <= n) {
      if (n % s == 0) {
        cout << f(s) << endl;
        break;
      }
      s++;
    }
  }
  return 0;
}
