NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on the Net, which asked him to compare the sizes of inner circles: [Image] 

It turned out that the circles are equal. NN was very surprised by this fact, so he decided to create a similar picture himself.

He managed to calculate the number of outer circles $n$ and the radius of the inner circle $r$. NN thinks that, using this information, you can exactly determine the radius of the outer circles $R$ so that the inner circle touches all of the outer ones externally and each pair of neighboring outer circles also touches each other. While NN tried very hard to guess the required radius, he didn't manage to do that. 

Help NN find the required radius for building the required picture.


-----Input-----

The first and the only line of the input file contains two numbers $n$ and $r$ ($3 \leq n \leq 100$, $1 \leq r \leq 100$) — the number of the outer circles and the radius of the inner circle respectively.


-----Output-----

Output a single number $R$ — the radius of the outer circle required for building the required picture. 

Your answer will be accepted if its relative or absolute error does not exceed $10^{-6}$.

Formally, if your answer is $a$ and the jury's answer is $b$. Your answer is accepted if and only when $\frac{|a-b|}{max(1, |b|)} \le 10^{-6}$.


-----Examples-----
Input
3 1

Output
6.4641016

Input
6 1

Output
1.0000000

Input
100 100

Output
3.2429391

Difficulty: EASY
Tags: Geometry

Sorting

Mathematics
Skill types: Sorting
Expected Time Complexity: O(1)

Starter code:

Solutions:
from math import *
sa = lambda : input()
sb = lambda : int(input())
sc = lambda : input().split()
sd = lambda : list(map(int, input().split()))
se = lambda : float(input())
sf = lambda : list(input())

def hnbhai():
	(n, r) = sd()
	ans = radians(180 / n)
	ans = sin(ans)
	print(r * ans / (1 - ans))
for _ in range(1):
	hnbhai()


import math
(n, r) = map(int, input().split())
pi = math.pi
s = math.sin(pi / n)
ans = round(r * (s / (1 - s)), 12)
print(ans)


import sys
from math import sin, pi
readline = sys.stdin.readline
(N, r) = map(int, readline().split())
theta = pi / N
ok = 10 ** 10
ng = 0
for _ in range(100000):
	med = (ok + ng) / 2
	if (1 / sin(theta) - 1) * med > r:
		ok = med
	else:
		ng = med
print(ok)


from math import cos, pi
(n, r) = map(int, input().split())
x = round(1 - cos(2 * pi / n), 9)

def sol(x, r):
	y = (2 * x) ** 2
	z = 2 * (x + r) ** 2
	return y / z
low = 0
high = 10 ** 9
eps = 1e-10
while high - low > eps:
	mid = (high + low) / 2
	if sol(mid, r) > x:
		high = mid
	else:
		low = mid
print(round(high, 6))


import math
(n, r) = map(int, input().split())
alpha = 2 * math.pi / n
beta = (math.pi - alpha) / 2
target = math.sin(alpha) / (2 * math.sin(beta))
(left, right) = (0, 1000000000)
while right - left > 10 ** (-6):
	R = (left + right) / 2
	val = R / (R + r)
	if val < target:
		left = R
	else:
		right = R
print((left + right) / 2)


from math import sin, pi
(n, r) = map(int, input().split())

def p(n, r):
	return 2 * n * r * sin(pi / n)
le = 0
ri = r * 1000
while ri - le > 1e-09:
	m = (ri + le) / 2
	if p(n, r + m) < n * m * 2:
		ri = m
	else:
		le = m
print(m)


from math import *
(n, r) = map(float, input().split())
R = 1.0 / (1.0 / sin(pi / n) - 1.0) * r
print(R)


import math
ar = [float(x) for x in input().split()]
n = ar[0]
radius = ar[1]
pi = 3.141592653589793
g = pi / n
c = radius * math.sin(g) / (1 - math.sin(g))
print('%.7f' % c)


def chPathToThis(f=None):
	import os
	f = __file__ if f is None else f
	os.chdir(os.path.dirname(f))
fle = None

def input():
	global fle

	def inner():
		if fle is None:
			from sys import stdin
			for line in stdin:
				yield line
			raise EOFError
		else:
			for line in fle:
				yield line.replace('\r', '').replace('\n', '')
			raise EOFError
	o = inner()
	return next(o)
import math

class SegmentTree:

	def __init__(self, A):
		self.N = len(A)
		self.st = [0] * (4 * self.N)
		self.build(1, 0, self.N - 1)

	def left(self, idx):
		return idx * 2

	def right(self, idx):
		return idx * 2 + 1

	def build(self, idx, l, r):
		if l == r:
			self.st[idx] = A[l]
		else:
			mid = (l + r) // 2
			self.build(self.left(idx), l, mid)
			self.build(self.right(idx), mid + 1, r)
			self.st[idx] = max(self.st[self.left(idx)], self.st[self.right(idx)])

	def update(self, a, b, val):
		return self.update_recursive(1, 0, self.N - 1, a - 1, b - 1, val)

	def update_recursive(self, idx, l, r, a, b, val):
		if r < a or l > b:
			return True
		if l == r:
			self.st[idx] = val
			return True
		mid = (l + r) // 2
		self.update_recursive(self.left(idx), l, mid, a, b, val)
		self.update_recursive(self.right(idx), mid + 1, r, a, b, val)
		self.st[idx] = max(self.st[self.left(idx)], self.st[self.right(idx)])
		return True

	def query(self, a, b):
		return self.query_recursive(1, 0, self.N - 1, a - 1, b - 1)

	def query_recursive(self, idx, l, r, a, b):
		if r < a or l > b:
			return -math.inf
		if l >= a and r <= b:
			return self.st[idx]
		mid = (l + r) // 2
		q1 = self.query_recursive(self.left(idx), l, mid, a, b)
		q2 = self.query_recursive(self.right(idx), mid + 1, r, a, b)
		return max(q1, q2)

	def showData(self):
		showList = []
		for i in range(1, N + 1):
			showList += [self.query(i, i)]
		print(showList)
A = []
N = 0

def main():
	tmp = input().split()
	(n, r) = (int(tmp[0]), float(tmp[1]))
	from math import cos, acos
	PI = acos(-1.0)
	aim = cos(PI * (n - 2) / (2 * n))
	(left, right) = (0.0, 100000000.0)
	while right - left >= 1e-08:
		mid = (right + left) / 2
		if mid / (r + mid) < aim:
			left = mid
		else:
			right = mid
	print(left)
try:
	import time, numpy
	chPathToThis(__file__)
	(begin, fle) = (time.clock(), open('pytest.txt'))
	main()
	fle.close()
	print(time.clock() - begin)
except ImportError:
	main()


import math
(n, r) = map(int, input().split())
num = math.pi * (n - 2)
dem = 2 * n
ans = r * math.cos(num / dem) / (1 - math.cos(num / dem))
print(ans)


import math
put = lambda : map(int, input().split())
(n, m) = put()
ang = math.pi / n
ans = m * math.sin(ang) / (1 - math.sin(ang))
print(ans)


import math
(n, r) = map(int, input().split())
ang = 360 / n
rad = math.pi / 180 * ang
rad = rad / 2
print(r * math.sin(rad) / (1 - math.sin(rad)))


from math import *
(n, r) = map(int, input().split())
x = (n - 2) * 180 / n / 2
x = cos(radians(x))
print(x * r / (1 - x))


import math
(n, r) = [int(i) for i in input().split()]
cos_half_a = math.cos(math.pi * (n - 2) / n / 2)
print(r * (cos_half_a / (1 - cos_half_a)))


import math
(n, r) = map(int, input().split())
print(r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n)))


from math import sin, radians
(n, m) = map(int, input().split())
(l, r) = (10 ** (-6), 10 ** 6)
alpha = 180 / n
while r - l > 10 ** (-6):
	mid = (r + l) / 2
	if mid / (mid + m) > sin(radians(alpha)):
		r = mid
	else:
		l = mid
print(r)


import math
import bisect
import itertools
import sys
I = lambda : sys.stdin.readline()
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 1:
		return False
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s
p = 180
(n, r) = map(int, input().split())
s = math.sin(math.radians(p / n))
print(round(s * r / (1 - s), 7))


import math

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
(n, r) = tuple(mi())
pi = 3.141592653589793
ans = r * math.sin(pi / n) / (1 - math.sin(pi / n))
print(ans)


import math
(n, m) = map(int, input().split())
root = math.sqrt(2 - 2 * math.cos(math.radians(360 / n)))
print(m * root / (2 - root))


import math
(n, r) = [int(x) for x in input().split(' ')]
k = (n - 2) * 90 / n
k = k * math.pi / 180
z = math.cos(k)
R = r / (1 - z)
R = R - r
print(round(R, 7))


import math
(N, r) = list(map(int, input().split()))
print(r * math.sin(math.pi / N) / (1 - math.sin(math.pi / N)))


from math import *
(n, r) = map(int, input().split())
st = sin(2 * pi / (2 * n))
ans = r * st / (1 - st)
print('%8f' % ans)


from math import sin, pi
(n, r) = [int(i) for i in input().split()]
print(-2 * r ** 2 * sin(pi / n) / (2 * r * sin(pi / n) - 2 * r))


import math
(n, m) = map(float, input().split())
k = math.sin(math.pi / n)
ans = m * k / (1.0 - k)
print(round(ans, 8))


import math
(n, m) = map(int, input().split())
t = math.pi
a = math.sin(t / n)
b = m * (a / (1 - a))
print(b)


import math
(n, R) = [int(x) for x in input().split()]
sin = math.sin(math.radians(360 / (2 * n)))
r = sin * R / (1 - sin)
print(r)


from math import sin, pi
(n, r) = map(int, input().split())
alpha = 360 / n
s1 = sin(pi * alpha / 180)
s2 = sin(pi * ((180 - alpha) / 2) / 180)
print(r * s1 / (2 * s2 - s1))


import math
(n, r) = [int(n) for n in input().split()]
x = 360 / (2 * n)
y = math.sin(math.radians(x))
t = y * r / (1 - y)
print(t)


import sys, math
(n, r) = map(int, sys.stdin.readline().split())
rad = math.radians((180 - 360 / n) / 2)
print(math.cos(rad) * r / (1 - math.cos(rad)))


import math
(n, r) = map(float, input().split())
p = math.pi
aa = 2 * p / n
a = math.sin(aa)
b = math.sin((p - aa) / 2)
R = r * a / (2 * b - a)
print(R)


import math
(n, r) = input().split(' ')
(n, r) = (int(n), int(r))
theta = math.pi / n
sinv = math.sin(theta)
print(r * sinv / (1 - sinv))


from math import sin, pi

def main():
	arr = input().split()
	n = int(arr[0])
	r = int(arr[1])
	const = sin(pi / n)
	print(r * const / (1 - const))
main()


import math
(n, R) = tuple(map(int, input().split()))
al = 2 * math.pi / n
beth = (math.pi - al) / 2
sal = math.sin(al)
sbeth = math.sin(beth)
sab = sal / sbeth
r = R * sab / (2.0 - sab)
print(r)


from math import cos, pi, sqrt
[n, r] = list(map(float, input().split()))
t = sqrt(2 / (1 - cos(2 * pi / n)))
print(r / (t - 1))


import math
(n, r) = list(map(int, input().split()))
R = r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n))
print('%.9f' % R)


import math
(n, r) = map(int, input().strip().split(' '))
theta = (n - 2.0) * math.pi / (2.0 * n)
x = r * math.cos(theta) / (1.0 - math.cos(theta))
print(x)


import math
(n, r) = map(int, input().split())
angle = 360 / n / 2
angle = angle * math.pi / 180
ans = r * math.sin(angle) / (1 - math.sin(angle))
print(ans)


import math
(n, r) = map(int, input().split())
dk = math.sin(3.141592623587 / n)
print(r * dk / (1 - dk))


import math
(n, r) = map(float, input().split())
print('%.7f' % (r / (1 / math.sin(math.radians(360 / (2 * n))) - 1)))


(k, R) = map(float, input().split())
import math
alpha = 2 * math.pi / k
m = 2 * R ** 2 - 2 * R ** 2 * math.cos(alpha)
m = math.sqrt(m)
x = m * R / (2 * R - m)
print(round(x, 9))


from math import pi, sin
(n, r) = map(int, input().split())
ans = sin(pi / n)
print('%.7lf' % (ans * r / (1 - ans)))


from math import sin, pi
(N, R) = map(int, input().split())
r = R / (1 / sin(pi / N) - 1)
print(r)


import math
(p, q) = input().split(' ')
n = int(p)
R = int(q)
x = R / (1 / math.sin(math.pi / n) - 1)
print(x)


import math
(n, r) = map(int, input().split())
pi = math.pi
a = pi * (n - 2) / n
print(r * math.cos(a / 2) / (1 - math.cos(a / 2)))


import math
a = list(map(int, input().split()))
t = math.sin(math.radians(360 / (2 * a[0])))
print(a[1] * t / (1 - t))


import math
(n, r) = list(map(int, input().split()))
angle = math.pi / n
c = math.sin(angle)
k = c / (1 - c)
R = k * r
R = float(format(R, '.7f'))
print(R)


import math
(n, r) = (int(x) for x in input().split())
l = r / (1 / math.sin(math.pi / n) - 1)
print(l)


import math
(n, r) = input().split()
n = int(n)
r = float(r)
deg = math.radians(360 / n)
R = math.sqrt(1 - math.cos(deg)) * r / (math.sqrt(2) - math.sqrt(1 - math.cos(deg)))
print(R)


import math
(n, m) = map(float, input().split())
k = math.sin(math.pi / n)
print(m * k / (1 - k))


(n, r) = input().split()
n = int(n)
r = int(r)
print
t = 360 / (2 * n)
import math
q = math.sin(math.pi / 180 * t)
print(r * q / (1 - q))


import math
(n, k) = map(int, input().split(' '))
x = math.pi / n
r = k / (1 / math.sin(x) - 1)
print('%0.9f' % r)


import math

def r(n, R):
	a = math.sin(math.pi / n)
	return a * R / (1 - a)
(n, R) = [float(x) for x in input().split()]
print(r(n, R))


from math import *
(n, r) = map(int, input().split())
d = radians(360 / (2 * n))
k = sin(d)
print(r * k / (1 - k))


import math
import collections
import bisect

def arrPrint(a):
	return ' '.join([str(i) for i in a])

def gridPrint(a):
	return '\n'.join([' '.join([str(j) for j in a[i]]) for i in range(n)])

def solve(n, r):
	return round(r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n)), 7)
(n, r) = [int(s) for s in input().split()]
result = solve(n, r)
print(result)


import math
(n, r) = [int(v) for v in input().split()]
beta = 1 - math.cos(2 * math.pi / n)
a = 1 - 2 / beta
R = r * (-1 - math.sqrt(2 / beta)) / a
print('%.8f' % R)


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify, nlargest
from copy import deepcopy
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_1():
	return list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))

def inps():
	return sys.stdin.readline()

def inpsl(x):
	tmp = sys.stdin.readline()
	return list(tmp[:x])

def err(x):
	print(x)
	exit()
(n, r) = inpl()
d = 180 / n
d = math.sin(d * math.pi / 180)
print(r * d / (1 - d))


from math import *
(n, k) = map(int, input().split())
a = sin(pi / n)
print(k * a / (1 - a))


[n, r] = [int(i) for i in input().split()]

def R(n, r):
	import math
	s = math.sin(math.pi / n)
	return r * s / (1 - s)
print('%.9f' % R(n, r))


from math import *
(n, r) = map(int, input().split())
angle = 3.14159265 / n
val2 = sin(angle)
val1 = r * val2
val3 = 1 - val2
print(val1 / val3)


from math import pi, sin
from decimal import Decimal
(n, r) = map(int, input().split())
alpha = Decimal(pi) / Decimal(n)
a = Decimal(sin(alpha))
R = Decimal(r * a / (1 - a))
print(R)


import math
(n, r) = [int(i) for i in input().split()]
t = math.cos(math.radians(360 / n))
x = -2 * r * (t - 1) + math.sqrt(4 * r * r * (t - 1) * (t - 1) - 4 * (t * t - 1) * r * r)
x = x / 2
x = x / (t + 1)
print(x)


import math
(n, R) = map(int, input().split())
theta = 2 * math.pi / n
cos = math.cos(theta)
print((R * (1 - cos) + (R * R * (1 - cos) * (1 - cos) + (1 - cos) * (1 + cos) * R * R) ** (1 / 2)) / (1 + cos))


import math
(n, r) = map(float, input().split())
PI = math.pi
sin_theta = math.sin(PI / n)
num = sin_theta * r
dem = 1 - sin_theta
print(num / dem)


import math
s = input().split()
(n, r) = (int(s[0]), int(s[1]))
kt = math.pi / n
skt = math.sin(kt)
print(r * skt / (1 - skt))


import math
(n, r) = map(float, input().split(' '))
val = math.sin(math.radians(180 / n))
R = r * val / (1 - val)
print(R)


import math

def main():
	(n, r) = list(map(int, input().split()))
	angle = math.sin(math.pi / n)
	R = r * angle / (1 - angle)
	print(R)
main()


from sys import *
from math import *
(n, r) = map(int, stdin.readline().split())
a = r
beta = 2 * pi / n
alpha = (pi - beta) / 2
b = a / sin(alpha) * sin(beta)
x = (2 * a - b) / (2 * a)
ans = b / x / 2
print(ans)


import math
(n, r) = map(int, input().split())
x = 360 / n
y = (180 - x) / 2
res = abs(math.sin(math.pi * x / 180)) / abs(2 * abs(math.sin(math.pi * y / 180)) - math.sin(math.pi * x / 180))
print(r * res)


import math
pi = 22 / 7
(n, r) = list(map(int, input().split()))
angle = 2 * math.pi / n
angle = angle / 2
value = r * math.sin(angle) / (1 - math.sin(angle))
print(round(value, 7))


(n, r) = list(map(int, input().strip().split()))
import math
angle = math.pi / n
sin = math.sin(angle)
R = r * sin / (1.0 - sin)
print(R)


import math
(n, R) = map(int, input().split())
l = 0
r = 7 * R
for i in range(100000):
	m = (l + r) / 2
	k = math.degrees(math.asin(m / (R + m))) * 2 * n
	if math.degrees(math.asin(m / (R + m))) * 2 * n <= 360:
		l = m
	else:
		r = m
print(l)


(n, R) = [int(j) for j in input().split()]
import math
sin_t = math.sin(180 / n * math.pi / 180)
r = R * sin_t / (1 - sin_t)
print(r)


from sys import stdin, stdout
from math import tan, pi, sqrt, sin
(n, r) = map(int, input().split())
k = 1 / sin(pi / n) - 1
ans = r / k
print(ans)


import math
(n, r) = map(int, input().split())
theta = math.pi / n
ans = r * math.sin(theta) / (1 - math.sin(theta))
print('%.8f' % ans)


import math
x = input().split(' ')
n = int(x[0])
r = int(x[1])
tan2 = math.tan(math.radians(180 / n)) ** 2
R = r * tan2 * (1 + (1 + 1 / tan2) ** 0.5)
print('%.7f' % R)


import math
(n, r) = [int(x) for x in input().split()]
a = math.cos(3.141592653589793 * (n - 2) / n / 2)
print(a * r / (1 - a))


def solve(a, b, c):
	D = b * b - 4 * a * c
	k = D ** 0.5
	x1 = (-b + k) / (2 * a)
	x2 = (-b - k) / (2 * a)
	return max(x1, x2)
from math import *
(n, r) = map(int, input().split())
a = (1 / tan(pi / n)) ** 2
b = -2 * r
c = -(r * r)
ans = solve(a, b, c)
print('%.10f' % ans)


import math
(N, R) = tuple([int(x) for x in input().split()])
sin = math.sin(math.pi / N)
print(R * sin / (1 - sin))


import math
(n, r) = list(map(int, input().split()))
R = r * math.pow(math.tan(math.pi / n), 2) + r * math.tan(math.pi / n) * pow(pow(math.tan(math.pi / n), 2) + 1, 1 / 2)
print(R)


import math
(n, r) = map(float, input().split())
a = math.pi / n
s = math.sin(a)
R = r * s / (1 - s)
print(R)


from math import sin, radians
(n, r) = [int(i) for i in input().split()]
alpha = sin(radians(180) / n)
print(alpha / (1 - alpha) * r)


from math import *

def main():
	(n, r) = list(map(int, input().split()))
	u = r * sin(radians(180 / n))
	l = 1 - sin(radians(180 / n))
	ans = u / l
	print(ans)
main()


import sys
import math

def main():
	it = iter(map(float, sys.stdin.read().split()))
	n = next(it)
	r = next(it)
	A = 2 * math.pi / n
	B = (math.pi - A) / 2
	K = math.sin(B) / math.sin(A)
	x = r / (2 * K - 1)
	sys.stdout.write('%.7f' % x)
main()


import math
s = input().split(' ')
n = int(s[0])
r = int(s[1])
alpha = math.pi * 2 / n
betta = (math.pi - alpha) / 2
rr = r * math.sin(alpha) / (math.sin(betta) * (2 - math.sin(alpha) / math.sin(betta)))
print(rr)


import math
d = list(map(int, input().split()))
n = d[0]
r = d[1]
b = math.sin(math.radians(360 / (2 * n)))
R = r * b / (1 - b)
print(R)


import math
R = lambda : map(int, input().split())
(n, r) = R()
ang = math.pi * (n - 2) / n
p = math.cos(ang / 2)
print(r * (p / (1 - p)))


import math
(n, r) = map(int, input().split())
theta = 360 / (2 * n)
sin_theta = math.sin(math.radians(theta))
ans = r * sin_theta / (1 - sin_theta)
print(ans)


import math
(n, r) = map(int, input().split())
a = 1 - math.cos(2 * math.pi / n)
D = 4 * r * r - 4 * (1 - 2 / a) * r * r
R = (-2 * r - math.sqrt(D)) / (2 * (1 - 2 / a))
print(R)


import math

def main():
	(n, r) = map(float, input().split())
	print(r * math.sin(math.pi / n) / (1.0 - math.sin(math.pi / n)))
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, r) = map(int, input().split())
import math
a = math.pi / 4
a *= 2 - 4 / n
a = math.cos(a)
a = 1 / a
a -= 1
print(r / a)


from math import pi, sin
(n, r) = list(map(float, input().split()))
ang = pi / n
k = sin(ang)
print(k * r / (1 - k))


import math
(n, r) = (int(i) for i in input().strip().split())
f = math.sin(math.radians(360 / (2 * n)))
print(r * f / (1 - f))


import sys
import math

def main():
	for line in sys.stdin:
		line = line.split()
		n = int(line[0])
		r = int(line[1])
		angle = (n - 2) * math.pi / (2 * n)
		ans = -r * math.cos(angle) / (math.cos(angle) - 1)
		print(ans)
main()


import sys
import math

def read_int():
	return int(input().strip())

def read_int_list():
	return list(map(int, input().strip().split()))

def read_string():
	return input().strip()

def read_string_list(delim=' '):
	return input().strip().split(delim)
(n, r) = read_int_list()
a = math.radians(360 / (2 * n))
sin_a = math.sin(a)
R = r * sin_a / (1 - sin_a)
print(R)


import math
nr = list(map(int, input().split()))
n = nr[0]
inner_r = nr[1]
alfa = 180 / n
alfa = math.radians(alfa)
sinus = math.sin(alfa)
outer_r = sinus * inner_r / (1 - sinus)
print(outer_r)


import math as m
(n, r) = map(int, input().split())
pi = m.pi
si = m.sin(pi / n)
R = r * si / (1 - si)
print('%.7f' % R)


from math import sin, radians
(n, r) = map(int, input().split())
print(r * sin(radians(180 / n)) / (1 - sin(radians(180 / n))))


from math import sin, pi
(n, r) = list(map(int, input().split()))
c = sin(pi / n)
print('%.7f' % (c / (1 - c) * r))


import math
inp = input().split()
n = int(inp[0])
r = int(inp[1])
theta = math.pi / n
m = 1 / math.sin(theta) - 1
answer = r / m
print(str.format('{0:.7f}', answer))


import math as m
(n, R) = input().split()
n = int(n)
R = int(R)
r = R / (m.cos(m.pi / n) / m.sin(2 * m.pi / n) - 0.5) / 2
print(r)


import math
(n, r) = list(map(int, input().split()))
angle = math.pi / n
print('%.7f' % (r / (1.0 / math.sin(angle) - 1)))


from math import *
(x, y) = map(int, input().split())
agl = 180.0 * (x - 2.0) / x / 2.0 * (pi / 180.0)
p = y / (1 / cos(agl) - 1)
print(p)


import math

def calc(p, r):
	l = math.radians(180.0 / p)
	return math.sin(l) * r / (1.0 - math.sin(l))
(p, r) = [float(i) for i in input().split()]
print(calc(p, r))


from math import sin, radians
(n, r) = map(int, input().split())
center = 360 / n
side = (180 - center) / 2
ang = sin(radians(center)) / (2 * sin(radians(side)))
print(ang * r / (1 - ang))


import math
(n, r) = input().split()
n = int(n)
r = int(r)
two = 2.0
one = 1.0
rad = math.pi / two - two * math.pi / (two * n)
c = one / math.cos(rad)
ans = r / (c - one)
print(ans)


import math
(n, r) = input().split()
print((-1 * (4 * float(r) * (math.cos(2 * 3.14159265359 / float(n)) - 1)) + math.sqrt(4 * float(r) * (math.cos(2 * 3.14159265359 / float(n)) - 1) * (4 * float(r) * (math.cos(2 * 3.14159265359 / float(n)) - 1)) - 4 * (2 * (1 + math.cos(2 * 3.14159265359 / float(n)))) * (2 * float(r) * float(r) * (math.cos(2 * 3.14159265359 / float(n)) - 1)))) / (2 * (2 * (1 + math.cos(2 * 3.14159265359 / float(n))))))


def chPathToThis(f=None):
	import os
	f = __file__ if f is None else f
	os.chdir(os.path.dirname(f))
fle = None

def input():
	global fle

	def inner():
		if fle is None:
			from sys import stdin
			for line in stdin:
				yield line
			raise EOFError
		else:
			for line in fle:
				yield line.replace('\r', '').replace('\n', '')
			raise EOFError
	o = inner()
	return next(o)

def main():
	tmp = input().split()
	(n, r) = (int(tmp[0]), float(tmp[1]))
	from math import cos, acos
	PI = acos(-1.0)
	aim = cos(PI * (n - 2) / (2 * n))
	(left, right) = (0.0, 100000000.0)
	while right - left >= 1e-08:
		mid = (right + left) / 2
		if mid / (r + mid) < aim:
			left = mid
		else:
			right = mid
	print(left)
try:
	import time, numpy
	chPathToThis(__file__)
	(begin, fle) = (time.clock(), open('pytest.txt'))
	main()
	fle.close()
	print(time.clock() - begin)
except ImportError:
	main()


import math
(n, r) = map(int, input().split())
R = None
R = math.sin(math.radians(180 / n)) * r / (1 - math.sin(math.radians(180 / n)))
print(R)


from math import pi, sin
(nb_outer, inner_radius) = [int(x) for x in input().split()]
outer = pi / nb_outer
outer = sin(outer)
print(outer * inner_radius / (1 - outer))


import math
(n, r) = map(int, input().strip().split())
tmp = math.sin(math.pi / n) / (1 + math.sin(math.pi / n))
ans = r * tmp / (1 - 2 * tmp)
print(ans)


import math
(n, r) = map(float, input().split())
L = math.pi * (n - 2) / n
print(r * math.cos(L / 2) / (1 - math.cos(L / 2)))


from sys import stdin, stdout
import math
k = math.pi
(n, r) = stdin.readline().split()
n = int(n)
r = int(r)
p = r * math.sin(k / n) / (1 - math.sin(k / n))
stdout.write(str(p))


import math
(n, r) = list(map(int, input().split()))
ang = math.pi * (n - 2) / (2 * n)
print(r * math.cos(ang) / (1 - math.cos(ang)))


import math
(n, r) = map(int, input().strip().split())
alpha = math.pi * (n - 2) / (2 * n)
beta = 2 * math.pi / n
t = math.tan((alpha - beta) / 2) / math.tan((alpha + beta) / 2)
answer = (r - t * r) / (3 * t + 1)
print(answer)


import math
(n, r) = map(int, input().split())
a = math.pi / n
b = math.sin(a)
print(r * b / abs(1 - b))


import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def revn(n):
	m = 0
	while n > 0:
		m = m * 10 + n % 10
		n = n // 10
	return m
(n, r) = mi()
print(r / (1 / math.sin(math.pi / n) - 1))


import math
(n, r) = list(map(int, input().split()))
p = math.pi
R = round(math.sin(p / float(n)) * float(r) / (1.0 - math.sin(p / float(n))), 7)
print(R)


from math import *

def read_nums():
	return [int(x) for x in input().split()]

def main():
	(n, r) = read_nums()
	y = cos(radians(360.0 / n))
	x1 = (-sqrt(2) * sqrt(-pow(r, 2) * (y - 1)) - r * y + r) / (y + 1)
	x2 = (sqrt(2) * sqrt(-pow(r, 2) * (y - 1)) - r * y + r) / (y + 1)
	res = max(x1, x2)
	print(res)
main()


import math
(a, b) = map(int, input().split())
c = b / (1 / math.sin(math.pi / a) - 1)
print(c)


from math import *
(n, r) = map(int, input().split())
alpha = pi / n
tg = sin(alpha)
print(r * tg / (1 - tg))


from math import *
(n, r) = map(int, input().split())
u = tan(2 * pi / n) * cos(pi / n) - sin(pi / n)
u = u * u
v = tan(2 * pi / n)
v = v * v + 1
a = u - v
b = 2 * r * u
c = r * r * u
R = (-b + sqrt(b * b - 4 * a * c)) / (2 * a)
if R <= 0:
	R = (-b - sqrt(b * b - 4 * a * c)) / (2 * a)
print(R)


import math
(n, r) = list(map(int, input().split()))
ang = 360 / (2 * n)
sini = math.sin(math.radians(ang))
ans = r * sini / (1 - sini)
print(ans)


from math import sin, pi
(n, r) = map(int, input().split())
k = sin((n - 2) * pi / (n * 2)) / sin(2 * pi / n)
R = r / (2 * k - 1)
print(R)


import math
PI = 3.14159265
(n, r) = map(int, input().split())
angle = 360 / n
x = math.cos(angle * PI / 180)
y = 1 - x
y = y / 2
y = 1 / y
y = math.sqrt(y)
y = y - 1
y = 1 / y
y = y * r
print(y)


import math
alph = 'abcdefghijklmnopqrstuvwxyz'
(n, r) = map(int, input().split())
cos = math.cos(math.radians((180 - 360 / n) / 2))
k = r * cos / (1 - cos)
print('%.9f' % k)


from math import sin, radians
(n, r) = map(int, input().split())
angle = 360 / (n * 2)
ratio = sin(radians(angle))
print(r * ratio / (1 - ratio))


import math
(n, r) = map(float, input().split())
print(r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n)))


from math import sin, pi
(n, r) = list(map(int, input().split()))
s = sin(pi / n)
ans = r * s / (1 - s)
print(ans)


import math
a = list(map(int, input().split()))
a1 = math.sin(360 / a[0] * (math.pi / 180))
a2 = math.sin((90 - 180 / a[0]) * (math.pi / 180))
a3 = 2 * a2 - a1
a4 = a[1] * a1
a5 = a4 / a3
print(a5)


from math import sin, radians
(n, r) = map(int, input().split())
dig = 360 / n / 2
theta = sin(radians(dig))
ans = theta * r / (1 - theta)
print('{:.7f}'.format(ans))


import math
(n, r) = map(int, input().split())
angle = 360 / n
b = 180 - angle
a = math.sin(math.radians(angle))
b = math.sin(math.radians(b / 2))
R = a / (2 * b - a)
print(R * r)


import math
In = input().split()
n = float(In[0])
r = float(In[1])
n = 360 / n
deg = n / 2
deg = math.sin(deg * (math.pi / 180.0))
R = deg * r / (1 - deg)
print(R)


import math
(n, r) = map(int, input().split())
ph = math.pi / n
z = math.sin(ph)
R = z * r / (1 - z)
print(R)


import math
(n, r) = [int(i) for i in input().split()]
t = math.sin(math.pi / n)
res = r * t / (1 - t)
print(res)


a = [int(i) for i in input().split(' ')]
N = a[0]
K = a[1]
from math import *
tar = 1 - cos(2 * pi / N)

def works(x):
	tmp = 4 * x * x / 2 / ((x + 1) * (x + 1))
	return tmp >= tar
low = 0
upp = 10
eps = 1e-09
while upp - low > eps:
	mid = (upp + low) / 2
	if works(mid):
		upp = mid
	else:
		low = mid
print(low * K)


import math as m
(n, r) = map(int, input().split())
(left, right) = (0.0, 10.0 ** 9)
mid = (left + right) / 2.0
f = m.sin(m.pi / n)
while left != mid and right != mid:
	if (mid + r) * f - mid <= 0:
		right = mid
	else:
		left = mid
	mid = (left + right) / 2.0
print(mid)


import math
(n, m) = map(int, input().split())
r = float(m)
pi = 3.14159265359
res = r * math.sin(pi / float(n)) / (1 - math.sin(pi / float(n)))
print(res)


import math
(n, r) = [int(x) for x in input().split()]
(lo, hi) = (0, 10 ** 18)
for i in range(120):
	R = (lo + hi) / 2
	if n * math.asin(R / (R + r)) > math.pi:
		hi = R
	else:
		lo = R
print(lo)


from math import *
(n, r) = [int(i) for i in input().split()]
a = pi / n
ans = r * sin(a) / (1 - sin(a))
print('%.7f' % ans)


import math
(n, r) = list(map(int, input().split()))
angle = math.pi * 2 / n
li = 0
ri = 100000000
for i in range(100):
	mid = (li + ri) / 2
	x1 = r + mid
	y1 = 0
	x2 = (r + mid) * math.cos(angle)
	y2 = (r + mid) * math.sin(angle)
	dist = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
	if dist < 2 * mid:
		ri = mid
	else:
		li = mid
print(li)


from math import *
(n, r) = map(int, input().split())
alfa = 360 / n
beta = (180 - alfa) / 2
alfa = pi * alfa / 180
beta = pi * beta / 180
x = r * sin(alfa) / (2 * sin(beta) - sin(alfa))
print('%.7f' % x)


from math import sin
from math import radians
(n, r) = [int(p) for p in input().split()]
y = radians(180 / n)
print(r * sin(y) / (1 - sin(y)))


from math import *
RADIAN = 57.29577951

def dtor(d):
	return d / RADIAN
s = input('').split(' ')
n = float(s[0])
R = float(s[1])
print('%f' % (0.5 * R * (pow(tan(dtor(45 + 90 / n)), 2) - 1)))


import math
(n, r) = map(int, input().split(' '))
x = (n - 2) * 180
z = x / n
R = r * math.cos(math.radians(z / 2)) / (1 - math.cos(math.radians(z / 2)))
print(R)


from math import pi, sin
(n, r) = [int(x) for x in input().split()]
print(round(r * sin(pi / n) / (1 - sin(pi / n)), 7))


import sys
import math

def main():
	strArgs = sys.stdin.readline().rstrip('\n').split(' ')
	nCircles = int(strArgs[0])
	r = float(strArgs[1])
	alpha = math.pi / nCircles
	R = r * math.sin(alpha) / (1 - math.sin(alpha))
	print(R)
main()


from math import *
(n, b) = map(int, input().split())
(l, r) = (0, 10000)
while r - l >= 1e-09:
	R = (l + r) / 2
	u = (b + R) * sin((180 - 360 / n) / 360 * pi)
	if u ** 2 + R ** 2 < (R + b) ** 2:
		l = R
	else:
		r = R
print(l)


import math
n = input().split(' ')
r = int(n[1])
n = int(n[0])
rad = (90 - 180 / n) * math.pi / 180
R = r / (1 / math.cos(rad) - 1)
print(R)


import math
(n, r) = [float(x) for x in input().split()]
alpha = math.sin(math.pi / n)
R = r * alpha / (1 - alpha)
print(R)


from math import sin
(n_kol, radiu) = [int(i) for i in input().split()]
pi = 3.1415926535
print(radiu * sin(pi / n_kol) / (1 - sin(pi / n_kol)))


import math
l = input().split()
(n, r) = (int(l[0]), int(l[1]))
theta = math.pi / n
x = math.sin(theta)
print(r * x / (1 - x))


import math

def sin(x):
	sum = 0
	for a in range(0, 50):
		sum += math.pow(-1, a) / math.factorial(2 * a + 1) * math.pow(x, 2 * a + 1)
	return sum
(n, r) = input().split()
n = int(n)
r = int(r)
ans = r * sin(math.pi / n)
ans = ans / (1 - sin(math.pi / n))
print(ans)


from math import *
(n, r) = map(int, input().split(' '))
num = sin(3.14159265359 / n)
R = r * num / (1 - num)
print(R)


from math import sin, radians

def main():
	(n, r) = map(int, input().split())
	angle1 = radians(180 * (n - 2) / (2 * n))
	angle2 = radians(180) - 2 * angle1
	numerator = r * sin(angle2)
	denominat = 2 * sin(angle1) - sin(angle2)
	print(numerator / denominat)
main()


import math
(n, r) = map(int, input().split())
a = math.pi * (n - 2) / n
a = a / 2
R = r * (math.cos(a) / (1 - math.cos(a)))
print('{0:.7f}'.format(R))


import math
(n, r) = [float(i) for i in input().split()]
st = math.sin(math.pi / (1.0 * n))
print(r * st / (1.0 - st))


import math
(n, R) = map(int, input().split())
print(R * math.sin(math.pi / n) / (1 - math.sin(math.pi / n)))


import math
p = list(map(int, input().split()))
n = p[0]
r = p[1]
pi = float(3.1415926535)
ans = float(math.sin(pi / n) * r / (1 - math.sin(pi / n)))
print('{:.7f}'.format(ans))


import sys, os
from math import sqrt, gcd, ceil, log, floor, sin, pi
from math import factorial as fact
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
from itertools import permutations
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))
MOD = 10 ** 9 + 7

def main():
	(n, r) = read()
	a = sin(pi / n)
	print(a * r / (1 - a))
main()


from math import *
(n, r) = map(int, input().split())
import math

def grad_to_rad(grad):
	return grad / 360 * math.pi * 2

def mysin(grad):
	return math.sin(grad_to_rad(grad))
f = 360 / n / 2
print(r * mysin(f) / (1 - mysin(f)))


import math
inp = input().split()
n = float(inp[0])
r = float(inp[1])
print(r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n)))


from sys import *
from math import *
from bisect import *
(n, k) = map(int, stdin.readline().split())
x = k * sin(radians(180 / n)) / (1 - sin(radians(180 / n)))
print(x)


from math import *
(n, r) = map(int, input().split())
num = r * sin(radians(360 / n))
lDen = 2 * sin(radians((180 - 360 / n) / 2))
rDen = sin(radians(360 / n))
print(num / (lDen - rDen))


from math import cos, pi
(n, r) = map(int, input().split())
theta = (n - 2) * pi / (2 * n)
print(r * cos(theta) / (1 - cos(theta)))


import math
(n, r) = map(int, input().split())
x = (n - 2) / (2 * n)
x *= 3.14159265359
if n == 6:
	print(r)
	exit()
print(r * math.cos(x) / (1 - math.cos(x)))


from math import cos
from math import pi
inp = input().split()
n = int(inp[0])
r = int(inp[1])
A = 1 + cos(2 * pi / n)
B = -2 * r * (1 - cos(2 * pi / n))
C = -1 * r ** 2 * (1 - cos(2 * pi / n))
print((-B + (B ** 2 - 4 * A * C) ** 0.5) / (2 * A))


import sys, math
from collections import defaultdict as dd
input = sys.stdin.readline
(n, r) = map(int, input().split())
x = math.sin(math.pi / n)
ans = r * x / (1 - x)
print(ans)


import math

def binary():
	global n, r
	(lo, hi) = (0, 100000)
	for i in range(1000):
		mid = lo / 2 + hi / 2
		(alfa, beta) = (math.sin((90 - 180 / n) * math.pi / 180), math.sin(360 / n * math.pi / 180))
		if mid * 2 * alfa / beta - mid > r:
			hi = mid
		else:
			lo = mid
	print(lo)
(n, r) = map(int, input().split())
binary()


import math
(n, r) = map(int, input().split())
c = math.sin(3.14159265 / n)
R = c * r / (1 - c)
print(R)


from math import sin, radians
(n, r) = list(map(int, input().split()))
theta = 360 / n
radians = radians(theta / 2)
a = 2 * r * sin(radians)
s = 2 * r * r / (2 * r - a) - r
print(s)


import math
(n, r) = map(int, input().split())
angle = math.pi / n
s = math.sin(angle)
print('%.8f' % (r * s / (1 - s)))


import math
(n, r) = input().split()
n = int(n)
r = float(r)
deg = math.radians(360 / n)
R = r * math.sin(deg / 2) / (1 - math.sin(deg / 2))
print(R)


from math import sin, pi
list_int_input = lambda inp: list(map(int, inp.split()))
int_input = lambda inp: int(inp)
string_to_list_input = lambda inp: list(inp)
nr = list_int_input(input())
(n, r) = (nr[0], nr[1])
sn = sin(pi / n)
rr = r * sn / (1 - sn)
print('%.7f' % rr)


import math
(n, k) = map(float, input().split())
print(k * math.sin(math.radians(360 / (2 * n))) / (1 - math.sin(math.radians(360 / (2 * n)))))


from math import *
from itertools import *
from collections import *
from functools import reduce
Q = q = quit
inf = float('inf')

def input_ints():
	return list(map(int, input().split()))

def input_floats():
	return list(map(float, input().split()))

def input_strings():
	return input().split()
(n, r) = input_ints()
s = sin(pi / n)
R = r * s / (1 - s)
print(R)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10000000)

class Operation:

	def __init__(self, name, function, function_on_equal, neutral_value=0):
		self.name = name
		self.f = function
		self.f_on_equal = function_on_equal

def add_multiple(x, count):
	return x * count

def min_multiple(x, count):
	return x

def max_multiple(x, count):
	return x
sum_operation = Operation('sum', sum, add_multiple, 0)
min_operation = Operation('min', min, min_multiple, 1000000000.0)
max_operation = Operation('max', max, max_multiple, -1000000000.0)

class SegmentTree:

	def __init__(self, array, operations=[sum_operation, min_operation, max_operation]):
		self.array = array
		if type(operations) != list:
			raise TypeError('operations must be a list')
		self.operations = {}
		for op in operations:
			self.operations[op.name] = op
		self.root = SegmentTreeNode(0, len(array) - 1, self)

	def query(self, start, end, operation_name):
		if self.operations.get(operation_name) == None:
			raise Exception('This operation is not available')
		return self.root._query(start, end, self.operations[operation_name])

	def summary(self):
		return self.root.values

	def update(self, position, value):
		self.root._update(position, value)

	def update_range(self, start, end, value):
		self.root._update_range(start, end, value)

	def __repr__(self):
		return self.root.__repr__()

class SegmentTreeNode:

	def __init__(self, start, end, segment_tree):
		self.range = (start, end)
		self.parent_tree = segment_tree
		self.range_value = None
		self.values = {}
		self.left = None
		self.right = None
		if start == end:
			self._sync()
			return
		self.left = SegmentTreeNode(start, start + (end - start) // 2, segment_tree)
		self.right = SegmentTreeNode(start + (end - start) // 2 + 1, end, segment_tree)
		self._sync()

	def _query(self, start, end, operation):
		if end < self.range[0] or start > self.range[1]:
			return None
		if start <= self.range[0] and self.range[1] <= end:
			return self.values[operation.name]
		self._push()
		left_res = self.left._query(start, end, operation) if self.left else None
		right_res = self.right._query(start, end, operation) if self.right else None
		if left_res is None:
			return right_res
		if right_res is None:
			return left_res
		return operation.f([left_res, right_res])

	def _update(self, position, value):
		if position < self.range[0] or position > self.range[1]:
			return
		if position == self.range[0] and self.range[1] == position:
			self.parent_tree.array[position] = value
			self._sync()
			return
		self._push()
		self.left._update(position, value)
		self.right._update(position, value)
		self._sync()

	def _update_range(self, start, end, value):
		if end < self.range[0] or start > self.range[1]:
			return
		if start <= self.range[0] and self.range[1] <= end:
			self.range_value = value
			self._sync()
			return
		self._push()
		self.left._update_range(start, end, value)
		self.right._update_range(start, end, value)
		self._sync()

	def _sync(self):
		if self.range[0] == self.range[1]:
			for op in self.parent_tree.operations.values():
				current_value = self.parent_tree.array[self.range[0]]
				if self.range_value is not None:
					current_value = self.range_value
				self.values[op.name] = op.f([current_value])
		else:
			for op in self.parent_tree.operations.values():
				result = op.f([self.left.values[op.name], self.right.values[op.name]])
				if self.range_value is not None:
					bound_length = self.range[1] - self.range[0] + 1
					result = op.f_on_equal(self.range_value, bound_length)
				self.values[op.name] = result

	def _push(self):
		if self.range_value is None:
			return
		if self.left:
			self.left.range_value = self.range_value
			self.right.range_value = self.range_value
			self.left._sync()
			self.right._sync()
			self.range_value = None

	def __repr__(self):
		ans = '({}, {}): {}\n'.format(self.range[0], self.range[1], self.values)
		if self.left:
			ans += self.left.__repr__()
		if self.right:
			ans += self.right.__repr__()
		return ans

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer / denom

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = False
testingMode = False
optimiseForReccursion = False

def main():
	(n, R) = get_tuple()
	theta = math.pi / n
	print(R * math.sin(theta) / (1 - math.sin(theta)))
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if testingMode else main()
else:
	(cProfile.run('main()') if testingMode else main()) if not optimiseForReccursion else threading.Thread(target=main).start()


from math import *
(n, r) = list(map(int, input().split()))
cs = cos(radians((180 - 360 / n) / 2))
k = r * cs / (1 - cs)
print('%.9f' % k)


from math import sin
import math
p = math.pi
(n, r) = list(map(int, input().split()))
s = sin(p / n)
R = r * s / (1 - s)
print(R)


import math
(n, r) = [int(x) for x in input().split()]
grad = math.radians(180 / n)
print(math.sin(grad) * r / (1 - math.sin(grad)))


(n, r) = (int(i) for i in input().split(' '))
import math as m
deg = 360 / n
c = m.cos(m.radians(deg))

def bins(a, b):
	if b - a < 1e-08:
		return a
	else:
		mid = (b - a) / 2 + a
		t1 = 2 * (r + mid) ** 2 * (1 - c)
		t2 = mid ** 2 * 4
		if t1 - t2 > 0:
			return bins(mid, b)
		else:
			return bins(a, mid)
ans = bins(0.0, 3000.0)
print('%.7f' % ans)


import math

def grad_to_rad(grad):
	return grad / 360 * math.pi * 2
(n, r) = map(int, input().split())
n = 180 * (n - 2) / n / 2
n = grad_to_rad(n)
ans = r * math.cos(n) / (1 - math.cos(n))
print(ans)


import math
(n, r) = map(int, input().split())
degrees = 360 / n / 2
radians = math.radians(degrees)
sinVal = math.sin(radians)
R = r * sinVal / (1 - sinVal)
print(R)


import math
(n, r) = map(int, input().split())
angle = 2 * math.pi / (2 * n)
a = math.sin(angle)
ans = r * a / (1 - a)
print(ans)


import math

def ang(n):
	outangle = 360.0 / n
	return 180 - outangle
(n, r) = input().split(' ')
n = float(n)
r = float(r)
angle = ang(n)
angle = math.pi / 180 * angle
x = r * math.cos(angle / 2)
x = x / (1 - math.cos(angle / 2))
print(x)


from math import pi
from math import sin
(n, r) = map(int, input().split())
theta = pi / n
a = r * sin(theta) / (1 - sin(theta))
print(a)


import math

def f(n, r):
	ct = math.sin(math.pi / n)
	return r * ct / (1 - ct)
print(f(*map(int, input().split())))


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)
(n, r) = map(int, input().split())
x = (n - 2) * 90 / n
x *= math.pi
x /= 180
t = math.cos(x)
print(r * t / (1 - t))


from math import sin, pi
(n, r) = map(int, input().split())
theta = pi / float(n)
sinv = sin(theta)
ans = sinv * r
sinv = 1 - sinv
ans = ans / sinv
print(ans)


from math import *

def solve(n, R):
	theta = 2 * pi / n
	s = sin(theta / 2)
	r = s * R / (1 - s)
	return r
(n, R) = map(float, input().split())
print('%.10f' % solve(n, R))


import math
(n, r) = map(int, input().split())
temp = math.sin(math.radians(360 / (2 * n)))
print(r * temp / (1 - temp))


import math
(n, r) = list(map(int, input().split()))
a = 360 / (n * 2)
p = math.pi / 180
print(r * math.sin(a * p) / (1 - math.sin(a * p)))


import math
(n, r) = map(int, input().split())
t = math.pi / n
b = 1 - math.sin(t)
a = math.sin(t)
ans = r * a / b
print(ans)


from math import sin
pi = 3.141592653589793
(n, r) = map(int, input().split())
theta = 2 * pi / n
R = r / (1 - sin(theta / 2))
print(R - r)


import math
(n, r) = list(map(int, input().split()))
pi = 3.14159265
angle = 360 / (2 * n)
param = angle * pi / 180
value = math.sin(param)
num = value * r
den = 1 - value
R = num / den
print(R)


import math
(n, r) = [int(x) for x in input().split()]
theta = 360 / n
p = math.pi
s = math.sin(theta / 2 * (p / 180))
R = s * r / (1 - s)
print(R)


from sys import stdin, stdout
import math
I = stdin.readline
P = stdout.write
(n, r) = map(int, I().split())
theta = math.pi / n
num = r * math.sin(theta)
den = 1 - math.sin(theta)
ans = num / den
print(ans)


import math
(n, r) = (int(s) for s in input().split(' '))
s = math.sin(math.pi / n)
print(-r * s / (s - 1))


import math
(n, r) = list(map(int, input().split(' ')))
l = 2 * r * math.sin(math.pi / n)
R = l * r / (-l + 2 * r)
print(R)


import math

def quadratic(a, b, c):
	return (-1 * b + math.sqrt(b * b - 4 * a * c)) / (2 * a)
PI = 3.14159265
x = input().split()
n = int(x[0])
r = int(x[1])
k = 360.0 / n
R = quadratic(2 / (1 - math.cos(k * PI / 180)) - 1, -2 * r, -r * r)
print(R)


from math import sqrt, tan, pi
(n, r) = input().split(' ')
n = int(n)
r = int(r)
print(r * tan(pi / n) * tan(pi / n) * (1 + sqrt(1 + 1 / (tan(pi / n) * tan(pi / n)))))


from math import sin, pi
inp = input().split()
(n, r) = (int(inp[0]), float(inp[1]))
x = sin(pi / n)
print(r * x / (1 - x))


import math
(n, R) = [int(x) for x in input().split()]
k = math.sin(3.14159265359 / n)
print(R * k / (1 - k))


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import *
(n, r) = I()
angle = radians(360 / n)
print(r / (1 / sin(angle / 2) - 1))


import math
(x, y) = map(int, input().split())
o = math.sin(math.pi / x)
ans = y * o / (1 - o)
print(ans)


from math import sin, pi

def f(a, b):
	angle = pi / b
	sine = sin(angle)
	return a * sine / (1 - sine)
(a, b) = map(int, input().strip().split())
print(f(b, a))


import math
(n, r) = map(int, input().split())
x = math.sin(math.pi / n)
r1 = x * r / (1.0 - x)
print('{0:.10f}'.format(r1))


from sys import stdin
import math
pi = math.pi
(n, r) = list(map(int, stdin.readline().split()))
iangle = 2 * pi / n
sangle = (pi - iangle) / 2
print(r * math.cos(sangle) / (1 - math.cos(sangle)))


import math
(n, r) = [int(x) for x in input().split()]
a = math.pi * (n - 2) / n
a = a / 2
ang = math.cos(a)
print(ang * r / (1 - ang))


import math
(n, r) = map(int, input().split())
x = (n - 2) / (2 * n)
x = x * math.pi
val = math.cos(x)
print(r * val / (1 - val))


from math import sin
(n, r) = [int(i) for i in input().split()]
pi = 3.14159265359
print(r / (2 * sin(pi * (1 / 2 - 1 / n)) / sin(2 * pi / n) - 1))


from math import *
(n, r) = map(int, input().split())
t = (pi - 2 * pi / n) / 2
ans = r * cos(t) / (1 - cos(t))
print('%.6f' % ans)


import math
(amount, R) = [int(s) for s in input().split()]
print(R * math.sin(math.pi / amount) / (1 - math.sin(math.pi / amount)))


import math
s = input().split()
n = int(s[0])
r = int(s[1])
alpha = math.pi / n
s = math.sin(alpha)
res = r * s / (1 - s)
print(res)


from math import cos, radians
(N, r) = map(int, input().split())
rad = radians((N - 2) * 180 / (N * 2))
_cos = cos(rad)
(ok, ng) = (10000, 0)
while ok - ng > 1e-08:
	mid = (ok + ng) / 2
	l1 = _cos * (r + mid) * (N * 2)
	l2 = mid * (N * 2)
	if l1 <= l2:
		ok = mid
	else:
		ng = mid
print(ok)


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def printp(p):
	for i in p:
		print(i)
MOD = 10 ** 9 + 7
T = 1
for _ in range(T):
	(n, r) = list(map(int, stdin.readline().split()))
	print(r * (cos(pi * (n - 2) / n / 2) / (1 - cos(pi * (n - 2) / n / 2))))


import sys
import math
line = sys.stdin.readline().split(' ')
(n, r) = (int(line[0]), int(line[1]))
ans = r * math.sin(math.pi / n) / (1 - math.sin(math.pi / n))
print(ans)


import math
(n, r) = map(int, input().split())
R = '{:.20f}'.format(r / (1 / math.sin(math.pi / n) - 1))
print(R)


from math import cos, radians, degrees
(n, r) = map(int, input().split())
ug = radians(180 - 2 * ((n - 2) * 180 / (2 * n)))
a = 2 + 2 * cos(ug)
b = 4 * r * cos(ug) - 4 * r
c = 2 * r * r * cos(ug) - 2 * r * r
ans = (-b + (b * b - 4 * a * c) ** 0.5) / (2 * a)
print(ans)


import math
(n, r) = [int(i) for i in input().split()]
R = -1 * r * (2 * r * math.sin(math.pi / n)) / (-2 * r + 2 * r * math.sin(math.pi / n))
print(R)


from math import sin, radians
arr = input().split()
n = int(arr[0])
r = int(arr[1])
i_a = 360 / n
s_a = (180 - i_a) / 2
s_to_i_ang_ratio = sin(radians(s_a)) / sin(radians(i_a))
r_o = r / (s_to_i_ang_ratio * 2 - 1)
print(r_o)


import math

def Solve(n, r):
	theta = 180 / n
	theta = math.radians(theta)
	upper = r * math.sin(theta)
	lower = 1 - math.sin(theta)
	return upper / lower

def main():
	(n, r) = map(int, input().split())
	print(Solve(n, r))
main()


from math import pi, sin
(k, r) = map(int, input().split())
print(r / (1 / sin(pi / k) - 1))


import math

def count_dif(R, r, n):
	return (2 * R) ** 2 - 2 * (r + R) ** 2 * (1 - math.cos(2 * math.pi / n))
(n, r) = input().split()
n = int(n)
r = int(r)
R = r
min = 0
max = 100000000000
R = max / 2
while abs(count_dif(R, r, n)) > 1e-09:
	R = (min + max) / 2
	if count_dif(R, r, n) > 0:
		max = R
	else:
		min = R
print(R)


(n, k) = map(int, input().split())
import math
v = math.pi
v /= n
a = math.sin(v)
t = a / (1 - a)
print(k * t)


import math
(n, r) = map(int, input().split())
d = math.pi / n
s = math.sin(d)
h = r * s
h = h / (1 - s)
print(h)


from math import sin
from math import pi
(a, b) = list(map(int, input().split()))
print(b * sin(pi / a) / (1 - sin(pi / a)))


import math
(n, r) = map(int, input().split())
theta = 2 * math.pi / n
R = (1 - math.cos(theta)) ** 0.5 * r / (2 ** 0.5 - (1 - math.cos(theta)) ** 0.5)
print(R)


from math import sin, pi
f = lambda n, r: round(r * sin(pi / n) / (1 - sin(pi / n)), 7)
(n, r) = map(int, input().split())
print(f(n, r))


import sys
import math
(n, r) = [int(z) for z in sys.stdin.readline().split()]
a = math.pi / n
sina = math.sin(a)
R = r * (sina / (1 - sina))
print(R)


from math import sin, pi
gi = lambda : list(map(int, input().split()))
(n, R) = gi()
print(R / (1 / sin(pi / n) - 1))


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial, cos, sin, pi
from collections import defaultdict, Counter, OrderedDict, deque
from string import ascii_lowercase, ascii_uppercase
from bisect import *
from functools import reduce
from operator import mul
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().strip('\n')
grid = lambda r: [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(n, R) = tup()
(theta, lo, hi) = (cos(2 * pi / n), 0, 1000)
while lo <= hi:
	r = (lo + hi) / 2
	x = (2 * r) ** 2
	y = (1 - theta) * (2 * (R + r) ** 2)
	if x - y == 0:
		break
	elif x - y < 0:
		lo = r + 5e-07
	else:
		hi = r - 5e-07
print(r)
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


import sys
from math import floor, ceil, sin, cos, tan, pi, radians, degrees, sqrt
input = sys.stdin.readline
(n, a) = map(int, input().split())
print(a * sin(pi / n) / (1 - sin(pi / n)))


from typing import List
from math import sin, pi
INF = float('inf')
NINF = float('-inf')

def read_string():
	return input()

def read_string_line():
	return [x for x in input().split(' ')]

def read_int_line():
	return [int(x) for x in input().split(' ')]

def read_int():
	return int(input())

def get_int_arr(s):
	return [int(x) for x in s.split()]

def get_sum(acc, l, r):
	return acc[r] - acc[l]
P = int(1000000000.0 + 7)

def exgcd(x, y):
	if y == 0:
		return (x, 1, 0)
	(g, a, b) = exgcd(y, x % y)
	t = x // y
	return (g, b, a - t * b)

def inv(x):
	(g, a, b) = exgcd(x, P)
	return a

def calc_acc(arr):
	ans = [0]
	for a in arr:
		ans.append(a + ans[-1])
	return ans
lines: List[str] = [*open(0)]
(n, r) = get_int_arr(lines[0])
x = sin(pi / n)
R = x * r / (1 - x)
print(R)


import math
s = input().split()
n = int(s[0])
r = int(s[1])
sx = math.sin(math.radians(180 / n))
print('{:0.7f}'.format(round(r * sx / (1 - sx), 7)))


from math import *
(n, R) = map(int, input('').split(' '))
cb = pow(cos(pi / n), 2)
a = cb
b = 2 * R * (cb - 1)
c = R * R * (cb - 1)
d = b * b - 4 * a * c
print(round((-b + sqrt(d)) / (2 * a), 6))


import math
(n, r) = map(int, input().split())
theta = math.acos(-1) / n
R = r * math.sin(theta) / (1 - math.sin(theta))
print('{0:0.15f}'.format(R))


import math
line1 = input('')
line1 = line1.split(' ')
n = float(line1[0])
r = float(line1[1])
val = math.cos(float(360 / n) * 3.14159265359 / 180)
val = (1 - val) ** 0.5
print(r * val / (2 ** 0.5 - val))


import math
(n, m) = map(int, input().split(' '))
ti = math.sin(math.radians(180 / n))
ans = m * ti / (1 - ti)
print(ans)


import math

class Solution(object):

	def solve(self):
		(n, r) = map(int, input().strip().split(' '))
		_tan = math.tan(math.radians(180 / n))
		_tan = _tan * _tan
		c = -1 * r * r * _tan
		b = -1 * 2 * r * _tan
		_uR = pow(b * b - 4 * c, 0.5)
		b = -1 * b
		_s1 = b + _uR
		_s2 = b - _uR
		return _s1 / 2 if _s1 > 0 else _s2 / 2
sol = Solution()
print(sol.solve())


from math import *
(n, r) = map(int, input().split())
x = (n - 2) * 90 / n
y = 180 - 2 * x
ans = sin(radians(y)) * r / (2 * sin(radians(x)) - sin(radians(y)))
print(ans)


import math
(n, r) = map(int, input().split())
a = math.sin(math.pi / n)
var = a * r / (1 - a)
print('%.7f' % var)


from math import cos, pi

def quad(a, b, c):
	return (-b + (b ** 2 - 4 * a * c) ** 0.5) / (2 * a)

def main():
	(n, r) = input().split(' ')
	n = int(n)
	r = int(r)
	theta = 2 * pi / n
	a = 4 - 2 * (1 - cos(theta))
	c = -2 * r ** 2 * (1 - cos(theta))
	b = -4 * r * (1 - cos(theta))
	val = quad(a, b, c)
	print(val)
main()


from math import sin, pi
(n, r) = [int(element) for element in input().split(' ')]
answer = r / (1 / sin(pi / n) - 1)
print(answer)


import math

def main():
	(n, r) = map(int, input().split())
	val = math.sin(math.radians(360 / n))
	num = r * val
	deno = 2 * math.sin(math.radians(90 * (n - 2) / n)) - val
	res = num / deno
	print(str.format('{0:.7f}', res))
main()


import math
(n, r) = list(map(int, input().strip().split()))
a = math.sin(math.pi / n)
print(r * a / (1 - a))


import math
(n, r) = list(map(int, input().split(' ')))
theta = 180 / n
sin_theta = math.sin(math.radians(theta))
R = r * sin_theta / (1 - sin_theta)
print(R)


import math

def main():
	buf = input()
	buflist = buf.split()
	n = int(buflist[0])
	r = int(buflist[1])
	R = 1
	delta = abs(((r + R) * math.cos(math.radians(180 / n))) ** 2 + R ** 2 - (r + R) ** 2)
	left = 0.0
	right = 1000000.0
	while delta > 1e-08:
		delta_left = abs(((r + left) * math.cos(math.radians(180 / n))) ** 2 + left ** 2 - (r + left) ** 2)
		delta_right = abs(((r + right) * math.cos(math.radians(180 / n))) ** 2 + right ** 2 - (r + right) ** 2)
		if delta_left < delta_right:
			right = right - (right - left) / 100
			R = left
		else:
			left = left + (right - left) / 100
			R = right
		delta = min(delta_left, delta_right)
	print(R)
main()


import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
from functools import lru_cache
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
from math import *
(n, r) = mapi()
(l, h) = (0, 10 * r)
angle = pi / n
e = 1e-10

def check(mid):
	if mid / (mid + r) - sin(angle) <= e:
		return True
	return False
while h - l > e:
	mid = (l + h) / 2
	if check(mid):
		l = mid
	else:
		h = mid
print(l)


import math
(n, r) = (int(x) for x in input().split())
s = math.sin(math.pi / n)
ans = r * s / (1 - s)
print('%.7f' % ans)


from math import cos, radians, sin
(n, k) = map(int, input().split())
ang = 360 / n
rad = radians(ang / 2)
print(k * sin(rad) / (1 - sin(rad)))


from math import pi, sin
(n, r) = map(int, input().split())
x = (n - 2) * pi / (2 * n)
y = 2 * pi / n
siny = sin(y)
sinx = sin(x)
ans = r * siny / (2 * sinx - siny)
print(ans)


from math import *
(n, m) = map(int, input().split())
b = sin(pi / n)
a = 2 * m * b / (1 - b)
print(a / 2)


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def digits(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def ceil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def mapin():
	return map(float, input().split())
(n, r) = mapin()
temp = math.pi / n
temp = 2 * math.sin(temp)
temp2 = 2 - temp
temp = temp / temp2
temp = temp * r
print(temp)


(n, r) = map(int, input().rstrip().split())
import math
theta = 2 * math.pi / n
r1 = r * math.sin(theta / 2) / (1 - math.sin(theta / 2))
print(r1)


import math
(n, r) = map(int, input().split())
X = math.pi * 2 / n
x = 2 - 2 * math.cos(X)
a = x - 4
b = 2 * x * r
c = x * r * r
delta = b * b - 4 * a * c
x1 = (-b + math.sqrt(delta)) / (2 * a)
x2 = (-b - math.sqrt(delta)) / (2 * a)
if x1 > 0:
	print(format(x1, '.7f'))
else:
	print(format(x2, '.7f'))


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	(n, r) = get_ints()
	from math import sin, radians
	angle = 360 / n
	other = radians((180 - angle) / 2)
	angle = radians(angle)
	ans = r * sin(angle) / (2 * sin(other) - sin(angle))
	print(ans)
main()


import math

def main():
	(n, r) = map(int, input().split())
	alpha = 2 * math.pi / n
	s = math.sin(alpha / 2)
	ans = -(r * s) / (s - 1)
	print(ans)
main()


from math import sin, pi

def main():
	(n, r) = [int(_) for _ in input().split()]
	sinA = sin(pi / n)
	sin90 = 1
	R = r * sinA / (sin90 - sinA)
	print(R)
main()


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())

def dist(x, y, c, d):
	return mt.sqrt((x - c) ** 2 + (y - d) ** 2)

def circle(x1, y1, x2, y2, r1, r2):
	distSq = ((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) ** 0.5
	if distSq + r2 <= r1:
		return True
	else:
		return False
(n, r) = M()
d = (n - 2) * mt.pi / (2 * n)
x = mt.cos(d)
print(r * x / (1 - x))


import math
(n, r) = map(float, input().split())
n = 2 * n
rad = math.sin(math.pi * 2 / n)
a = rad / (1 - rad) * r
print('%.6f' % a)


import math

def get_n():
	return int(input())

def get_int_vector():
	return [int(x) for x in input().split()]

def list2string(list):
	result = []
	for i in list:
		result.append(str(i))
	return ':'.join(result)

def string2vector(string):
	return [int(x) for x in string.split(':')]
(n, r) = get_int_vector()
angle = 2 * math.pi / n
print('{:.7f}'.format(r * math.sin(angle / 2) / (1 - math.sin(angle / 2))))


import math

def main():
	(n, r) = input().split()
	n = int(n)
	r = int(r)
	print(-(r / (1 - 1 / math.sin(math.pi / n))))
main()


import math
(n, r) = map(int, input().split())
alpha = 360 / n / 2
sin = math.sin(alpha / 180 * math.pi)
x = sin * r / (1 - sin)
print(x)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	(n, r) = map(int, sys.stdin.readline().split(' '))
	val = math.cos(math.pi * 2 / n)
	val = 1 - val
	val /= 2
	val = pow(val, 0.5)
	x = val * r
	x /= 1 - val
	print(x)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


import math
pi = 3.1415926535
(n, r) = map(float, input().split())
theta = (n - 2) * pi / (2 * n)
ans = r * math.cos(theta) / (1 - math.cos(theta))
print(ans)


import math
s = list(map(int, input().split()))
(n, r) = (s[0], s[1])
pi = math.radians(180 / n)
x = math.sin(pi)
ans = x * r / (1 - x)
print(ans)


(n, r) = map(int, input().split())
theta = 360 / n
from math import sin, pi
R = r * sin(pi / n) / (1 - sin(pi / n))
print(R)


import math
s = input()
l = s.split(' ')
n = int(l[0])
r = int(l[1])
t = 2 * math.pi / n
res = math.sin(t / 2)
ans = r * res
ans = ans / (1 - res)
print(ans)


import math
(n, r) = map(int, input().split())
a = 180 * (n - 2) / (2 * n)
c = math.cos(math.radians(a))
print(format(r * c / (1 - c), '.7f'))


from math import cos, radians
(n, r) = list(map(int, input().split()))
deg = (n - 2) * 90 / n
cc = cos(radians(deg))
print(cc * r / (1 - cc))


import math
(n, r) = map(int, input().split())
th = 2 * math.pi / n
l = (1 - math.cos(th)) ** 0.5
print(round(r * l / (2 ** 0.5 - l), 7))


import math
(n, r) = map(float, input().split())
n = int(n)
z = math.tan(math.pi / n)
a = z ** 2 + math.sqrt(z ** 4 + z ** 2)
print(a * r)


import math

def check(ar, s):
	if ar.count(s) > 0:
		return True
	return False
(n, r) = [int(i) for i in input().split()]
x = math.sin(math.radians(360 / n / 2))
R = x * r / (1 - x)
print(R)


(n, r) = map(float, input().split())
import math as m
angle = m.radians(360 / n)
bangle = m.radians(180) - angle
bangle = bangle / 2
small_angle = m.sin(bangle)
big_angle = m.sin(angle)
k = big_angle / small_angle
R = r * k / (2 - k)
print(R)


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict, deque, Counter, OrderedDict
import threading
from math import *

def main():
	(n, r) = map(int, input().split())
	radian = radians(360 / (2 * n))
	print(r * sin(radian) / (1 - sin(radian)))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
(n, r) = map(int, input().split())
rad = math.pi / n
ans = r / (1 / math.sin(rad) - 1)
print(f'{ans}')


import math
(n, r) = map(int, input().split())
k = 1 / math.sin(3.141592653589793 / n) - 1
print(r / k)


from operator import itemgetter
from math import log, ceil, sin, pi
(n, R) = map(int, input().split())
num = sin(pi / n)
r = 0
print(abs(num * R / (1 - num)))


from math import sin
(n, r) = [int(i) for i in input().split()]
Pi = 3.1415926535
print(r * sin(Pi / n) / (1 - sin(Pi / n)))