#include using namespace std; const int N=1000005; int t,n,m,i,dp[10105],j,q[405][405]; int dfs(int n,int f) { if(n<60) return 0; if(f>4) return 0; if(q[n][f]!=-1) return q[n][f]; int ans=0,i; for(i=60;i<=n&&i<=100;++i) ans=max(ans,dfs(n-i,f+1)+dp[i]); return q[n][f]=ans; } void aa(int l,int r,int x) { for(i=l;i<=r;++i) dp[i]=x; } int main(){ scanf("%d",&t); aa(60,61,10); aa(62,64,17); aa(65,66,20); aa(95,100,43); aa(90,94,40); aa(85,89,37); aa(80,84,33); aa(75,79,30); aa(70,74,27); aa(67,69,23); memset(q,-1,sizeof(q)); while(t--) { scanf("%d",&n); cout<