#include <bits/stdc++.h>
using namespace std;

long long t, n, m, ans;

int main() {
	ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
	cin >> t;
	while (t--) {
		cin >> n;
		m = (n * n) - ((n - 1) * (n - 1));
		ans = 1;
		while (ans * ans <= m)
			ans++;
		cout << ans / 2 - 1 << '\n';
	}
}

