#include <bits/stdc++.h>
using namespace std;
long long dp[100005] = {1, 2};
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  for (long long i = 2, j = 2; i <= 100000; i += 2) {
    dp[i] = dp[i - 1] + j;
    dp[i + 1] = dp[i] + j;
    ++j;
  }
  long long n, x;
  cin >> n;
  while (n--) {
    cin >> x;
    cout << lower_bound(dp, dp + 100000, x) - dp << "\n";
  }
  return 0;
}
