import java.util.*;

public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		
		if ((n < 3) || (n > 5)) System.out.println("Solution does not exist.");
		else
		{
			double s_2 = Math.sin(Math.PI / n);
			s_2 *= s_2;
			double r = Math.sqrt(1-1/(4.0*s_2));
			System.out.println(r);
		}
	}
}