#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
int main(){
  ll N;
  cin >> N;
  ll ans = 0;
  for(ll i = 1;i * i <= N;i++){
    if(N % i == 0){
      ans = to_string(N/i).size();
    }
  }

  cout << ans << endl;
}
