#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 200005;
void solve();
string getString(char x) {
  string s(1, x);
  return s;
}
bool sz(long long a, long long b) { return a > b; }
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
void solve() {
  int a, p;
  cout << (a * 3 + p) / 2;
}
