#include "bits/stdc++.h" using namespace std; const int N = 105; const int inf = 1e9+7; int a[N] = {0,60,62,65,67,70,75,80,85,90,95}; double b[N] = {0,1.0,1.7,2.0,2.3,2.7,3.0,3.3,3.7,4.0,4.3}; int main() { int t; cin>>t; while(t--){ int n; cin>>n; double ans = 0; for(int i=0;i<=11;i++) for(int j=i;j<=11;j++) for(int k=j;k<=11;k++) for(int p=k;p<=11;p++){ int sum = a[i] + a[j] + a[k] + a[p]; if(sum>n) break; double ra = b[i] + b[j] + b[k] + b[p]; ans = max( ra , ans ); } printf("%.1f\n",ans); } }