#include #define MAX 92 using namespace std; int n, m, i, j, k, t; int flag[5] = { 0 }; int num[4]; int main() { scanf("%d", &t); while (t--) { for (int i = 1; i < 5; i++) { flag[i] = 1; } int sum = 0; __int64 temp = 1; scanf("%d", &n); for (int i = 0; i < 4; i++) { num[i] = n - i; for (int j = 1; j < 5; j++) { if (flag[j] == 1) { if (num[i] % j == 0) { num[i] /= j; flag[j] = 0; } } } } for (int i = 0; i < 4; i++){ temp *= num[i]; } for (int i = 1; i < 5; i++) { if (flag[i] == 1) { temp /= i; } } /*t1 = (n - 1) / 4; t2 = (n - 2) / 3; t3 = (n - 3) / 2; temp *= t1; temp *= t2; temp *= t3;*/ temp += n; printf("%I64d\n", temp); } }