#include using namespace std; const int sc[11] = {0, 60, 62, 65, 67, 70, 75, 80, 85, 90, 95}; const double jd[11] = {0, 1, 1.7, 2, 2.3, 2.7, 3, 3.3, 3.7, 4, 4.3}; int T, sum; double ans; int main() { scanf("%d", &T); while (T--) { ans = 0; scanf("%d", &sum); for (int i = 0; i < 11; i++) for (int j = i; j < 11; j++) for (int k = j; k < 11; k++) for (int l = k; l < 11; l++) if (sc[i] + sc[j] + sc[k] + sc[l] <= sum) ans = max(ans, jd[i] + jd[j] + jd[k] + jd[l]); printf("%.1lf\n", ans); } return 0; }