#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    cout << fixed << setprecision(10);
    double n;
    cin >> n;
    n *= 2;
    cout << (cos(3.14159265359 / (2 * n)) / sin(3.14159265359 / n)) << endl;
  }
  return 0;
}
