#include <iostream>
#include <cmath>
using namespace std;

int main() {
	unsigned int n; double s_2, r;
	cin >> n;
	if ((n < 3) || (n > 5)) cout << "Solution does not exist." << endl;
	else
	{
		s_2 = sin(M_PI/n);
		s_2 *= s_2; //Возведение синуса во вторую степень.
		r = sqrt(1 - 1/(4.0*s_2));
		cout << r << endl;
	}
	return 0;
}