# Arup Guha
# 3/16/2026
# Solution to 2026 UCF HS Contest Problem J: Elephant Escape Artists

import math

# Get input.
toks = input().split()
n = int(toks[0])
s = int(toks[1])

# Angle in radians.
theta = math.pi/n

# Radius of circumcircle
r = s/(2*math.sin(theta))

# Length of apothem
apothem = r*math.cos(theta)

# Here is the desired distance.
res = r-apothem
print(f"{res:.12f}")

''' Note: Mathematically, using a half angle trig identity, we could also do

res = s*math.tan(theta/2)/2

There are probably several other equivalent mathematical expressions.

'''
