import java.util.*;
public class AreaOfRegularPolygon{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the no. of sides of the Polygon");
int n = sc.nextInt();
System.out.println("Enter the length of side of the Polygon");
double s = sc.nextDouble();
System.out.println("Area of Polygon with "+n+" "+"sides is : "+calculateArea(n, s));
}
public static double calculateArea(int n, double s){
return (n * s * s) / (4 * Math.tan(Math.PI/n));
}
}