#include using namespace std; const int N = 550; const int INF = 0x3f3f3f3f; double Gpa(int x ) { if(x >= 95) { return 4.3; } else if (x >= 90) { return 4.0; } else if (x >= 85) { return 3.7; } else if (x >= 80) { return 3.3; } else if (x >= 75) { return 3.0; } else if (x >= 70) { return 2.7; } else if(x >= 67) { return 2.3; } else if( x>= 65) { return 2.0; } else if (x >= 62) { return 1.7; } else if(x >= 60) { return 1.0; } else { return 0; } } double dp[201]; int main() { int t; scanf("%d",&t); for(int i = 0;i<=200;i++) { dp[i] = 0; } for(int i=0; i<=100; i++) { for(int j =0; j<=100; j++) { dp[i+j] = max(dp[i+j],Gpa(i)+Gpa(j)); } } while(t--) { int x ; scanf("%d",&x); double ans = 0; for(int i = 0;i<=100;i++) { for(int j = 0;j<=100;j++) { if(i+j> x) { break; } ans = max(ans, dp[i+j]+dp[x-i-j]); } } printf("%.1f\n",ans); } return 0; }