output_description: Print the minimum value of F(A,B) as (A,B) ranges over all pairs of positive
  integers such that N = A \times B.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: #include <iostream>
  #include <sstream>
  #include <cstdio>
  #include <cstdlib>
  #include <cmath>
  #include <ctime>
  #include <cstring>
  #include <string>
  #include <vector>
  #include <stack>
  #include <queue>
  #include <deque>
  #include <map>
  #include <set>
  #include <bitset>
  #include <numeric>
  #include <utility>
  #include <iomanip>
  #include <algorithm>
  #include <functional>
  #include <unordered_map>
  using namespace std;
  
  #define REP(i, s) for (int i = 0; i < s; ++i)
  #define ALL(v) (v.begin(), v.end())
  #define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
  #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
  
  template <class T>
  inline bool chmax(T &a, T b)
  {
      if (a < b)
      {
          a = b;
          return 1;
      }
      return 0;
  }
  template <class T>
  inline bool chmin(T &a, T b)
  {
      if (a > b)
      {
          a = b;
          return 1;
      }
      return 0;
  }
  template <class T1, class T2>
  ostream &operator<<(ostream &s, pair<T1, T2> P)
  {
      return s << '<' << P.first << ", " << P.second << '>';
  }
  template <class T>
  ostream &operator<<(ostream &s, vector<T> P)
  {
      for (int i = 0; i < P.size(); ++i)
      {
          if (i > 0)
          {
              s << " ";
          }
          s << P[i];
      }
      return s;
  }
  template <class T>
  ostream &operator<<(ostream &s, vector<vector<T>> P)
  {
      for (int i = 0; i < P.size(); ++i)
      {
          s << endl
            << P[i];
      }
      return s << endl;
  }
  template <class T>
  ostream &operator<<(ostream &s, set<T> P)
  {
      EACH(it, P) { s << "<" << *it << "> "; }
      return s << endl;
  }
  template <class T1, class T2>
  ostream &operator<<(ostream &s, map<T1, T2> P)
  {
      EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; }
      return s << endl;
  }
  typedef long long ll;
  
  #define EPS (1e-7)
  #define INF (1e9)
  #define PI (acos(-1))
  
  int func(long long num){
      int cnt = 0;
      while (num > 0)
      {
          num /= 10;
          cnt++;
      }
      return cnt;
  }
  
  int main()
  {
      long long  n;
      cin >> n;
      int ans = INF;
      for (int i = 1; i <= sqrt(n) + 1; i++)
      {
          int tmp=INF;
          if (n % i == 0)
          {
              tmp = max(func(i), func(n / i));
              
          }
          ans = min(ans, tmp);
      }
      cout << ans << endl;
  }
problem_description: Statement
  
  You are given an integer N.  
  For two positive integers A and B, we will define F(A,B) as the larger of the
  following: the number of digits in the decimal notation of A, and the number
  of digits in the decimal notation of B.  
  For example, F(3,11) = 2 since 3 has one digit and 11 has two digits.  
  Find the minimum value of F(A,B) as (A,B) ranges over all pairs of positive
  integers such that N = A \times B.
samples: [{"input": "10000", "output": "3\n    \n\nF(A,B) has a minimum value of 3 at (A,B)=(100,100).\n\n* * *"}, {"input": "1000003", "output": "7\n    \n\nThere are two pairs (A,B) that satisfy the condition: (1,1000003) and\n(1000003,1). For these pairs, F(1,1000003)=F(1000003,1)=7.\n\n* * *"}, {"input": "9876543210", "output": "6"}]