#include<iostream>#include<cmath>using namespace std;int main(){ int t,n; double sum; cin>>t; while(t--) { cin>>n; sum=0; for(int i=1;i<=n;i++) sum+=log10((double)i); cout<<int(sum+1)<<endl; } return 0;}