#include #include #include #include #define INF 1e8 using namespace std; int main() { int t,i; long long sum,x; scanf("%d",&t); while(t--) { long long a[1000]={1,2}; i=1; sum=1; scanf("%I64d",&x); while(sum+a[i]<=x) { sum+=a[i]; a[i+1]=a[i]+a[i-1]; i++; } printf("%d\n",i); } }