#include <bits/stdc++.h>
using namespace std;

int main() {
    int64_t n;
    cin >> n;
    for(int64_t i = (int64_t)sqrt(n); i > 0; i--){
        if(n % i == 0){
            cout << (int64_t)log10(n/i) + 1 << endl;
            break;
        }
    }
    return 0;
}