from math import sin, sqrt, radians

n, r = map(int, input().split())

o = 360 / (n * 2)
a = o / 2
c = 180 - o - a

A = (r * sin(radians(a))) / sin(radians(c))
O = (r * sin(radians(o))) / sin(radians(c))

area = 0.5 * A * r * sin(radians(o))
print(2 * n * area)

b83a931d80ca4393e9b7aaff2c4ca05de938a550
<mask token>

<mask token>
print(2 * n * area)

<mask token>
n, r = map(int, input().split())
o = 360 / (n * 2)
a = o / 2
c = 180 - o - a
A = r * sin(radians(a)) / sin(radians(c))
O = r * sin(radians(o)) / sin(radians(c))
area = 0.5 * A * r * sin(radians(o))
print(2 * n * area)

from math import sin, sqrt, radians
n, r = map(int, input().split())
o = 360 / (n * 2)
a = o / 2
c = 180 - o - a
A = r * sin(radians(a)) / sin(radians(c))
O = r * sin(radians(o)) / sin(radians(c))
area = 0.5 * A * r * sin(radians(o))
print(2 * n * area)

from math import sin, sqrt, radians

n, r = map(int, input().split())

o = 360 / (n * 2)
a = o / 2
c = 180 - o - a

A = (r * sin(radians(a))) / sin(radians(c))
O = (r * sin(radians(o))) / sin(radians(c))

area = 0.5 * A * r * sin(radians(o))
print(2 * n * area)
