One beautiful day Vasily the bear painted 2m circles of the same radius R on a coordinate plane. Circles with numbers from 1 to m had centers at points (2R - R, 0), (4R - R, 0), ..., (2Rm - R, 0), respectively. Circles with numbers from m + 1 to 2m had centers at points (2R - R, 2R), (4R - R, 2R), ..., (2Rm - R, 2R), respectively. 

Naturally, the bear painted the circles for a simple experiment with a fly. The experiment continued for m^2 days. Each day of the experiment got its own unique number from 0 to m^2 - 1, inclusive. 

On the day number i the following things happened:   The fly arrived at the coordinate plane at the center of the circle with number $v = \lfloor \frac{i}{m} \rfloor + 1$ ($\lfloor \frac{x}{y} \rfloor$ is the result of dividing number x by number y, rounded down to an integer).  The fly went along the coordinate plane to the center of the circle number $u = m + 1 +(i \operatorname{mod} m)$ ($x \text{mod} y$ is the remainder after dividing number x by number y). The bear noticed that the fly went from the center of circle v to the center of circle u along the shortest path with all points lying on the border or inside at least one of the 2m circles. After the fly reached the center of circle u, it flew away in an unknown direction. 

Help Vasily, count the average distance the fly went along the coordinate plane during each of these m^2 days.


-----Input-----

The first line contains two integers m, R (1 ≤ m ≤ 10^5, 1 ≤ R ≤ 10).


-----Output-----

In a single line print a single real number — the answer to the problem. The answer will be considered correct if its absolute or relative error doesn't exceed 10^{ - 6}.


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

Output
2.0000000000

Input
2 2

Output
5.4142135624



-----Note-----

[Image]

Figure to the second sample

Difficulty: interview

Starter code:

Solutions:
import math
m,R=list(map(int,input().split()))

cord=math.sqrt(2*(R**2))
ans=0
unit=int(2*R)
x=(m)*(m/2)
for i in range(m):
    ans+=2*R*m
    ans+=(cord*(m-1))
    if(i==0 or i==m-1):
        if(m==1):
            continue
        ans+=cord*(m-2)
    else:
        if(m==1):
            continue
        ans+=cord*(m-3)
    #left
    left=(i-1)-1
    if(left<-1):
        left=-1
    ans+=(left+1)*(left/2)*unit
    #right
    r=(m-1)-(i)-2
    if(r<-1):
        r=-1
    ans+=(r+1)*(r/2)*unit
ans/=(m**2)
print(ans)


m,R = [int(x) for x in input().split()]

if m == 1:
    print(2*R)
else:
    tot = 0
    for i in range(m):
        tot += 2
        if i == 0 or i == m-1:
            tot += 2+2**.5
            tot += (m-2)*(m-1)
            tot += 2*2**.5*(m-2)
        else:
            tot += 4+2*2**.5
            tot += i*(i-1)
            tot += (m-i-1)*(m-i-2)
            tot += 2*2**.5*(m-3)
        #print(i,tot)
    tot *= R
    tot /= m*m
    print(tot)

##print(
##print(R*(2+(1+2**.5+(2*m-1)/3)*(m-1))/m)
##print(R*(1+m+m*2**.5-2**.5+(2*m*m/3)-m+1/3)/m)
##print(R*(1/m+2**.5-(2**.5)/m+2*m/3+1/3))
##print(R/m+R*2**.5-(R*2**.5)/m+2*R*m/3+R/3)


m,R=map(int, input().split())
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)

m, r = list(map(int, input().split()))

def calc(k):
    nonlocal r
    if k < 1:
        return 0
    elif k == 1:
        return r * (2**0.5 + 2)
    else:
        return r * ((1 + 2 * (k - 1)) * 2**0.5 + k * 2 + (k - 1) * (k - 2))

avg = 0
div = m ** 2

for i in range(0, m):
    avg += (2 * r + calc(i) + calc(m - 1 - i)) / div
 
print(avg)


m, r = list(map(int, input().split()))

def calc(k):
    if k < 1:
        return 0
    else:
        return (1 + 2 * (k - 1)) * 2**0.5 + k * 2 + (k - 1) * (k - 2)

avg = 0
div = m ** 2

for i in range(0, m):
    avg += r * (2 + calc(i) + calc(m - 1 - i)) / div
 
print(avg)


import math
m,R=map(int,input().split())
cord=math.sqrt(2*(R**2))
li=0
unit=int(2*R)
x=(m)*(m/2)
for i in range(m):
    li+=2*R*m
    li+=(cord*(m-1))
    if(i==0 or i==m-1):
        if(m==1):
            continue
        li+=cord*(m-2)
    else:
        if(m==1):
            continue
        li+=cord*(m-3)
    left=(i-1)-1
    if(left<-1):
        left=-1
    li+=(left+1)*(left/2)*unit
    r=(m-1)-(i)-2
    if(r<-1):
        r=-1
    li=li+(r+1)*(r/2)*unit
li/=(m**2)
print(li)

import math

m,R = list(map (int,input().split()))

D = math.sqrt (2) * R
result = 0

def sum_dist (n):
  return n*(n+1)*R + 2*D*n

for i in range (1,m+1):
  result += 2*R
  if i-1   > 0: result += 2*R + D
  if m-i   > 0: result += 2*R + D
  if i-2   > 0: result += sum_dist (i-2)
  if m-i-1 > 0: result += sum_dist (m-i-1)

print(result / m / m)


import math

m,R = map (int,input().split())

D = math.sqrt (2) * R
result = 0

def sum_dist (n):
  return n*(n+1)*R + 2*D*n

for i in range (1,m+1):
  result += 2*R
  if i-1   > 0: result += 2*R + D
  if m-i   > 0: result += 2*R + D
  if i-2   > 0: result += sum_dist (i-2)
  if m-i-1 > 0: result += sum_dist (m-i-1)

print (result / m / m)

m, r = map(int, input().split())
print(2 * r * (m + (2 + 2 ** 0.5) * (m - 1) + (m - 1) * (m - 2) * (m / 3 + 2 ** 0.5)) / (m * m))

#!/usr/bin/env python3
from math import sqrt
m, r = list(map(int,input().split()))
acc = 0.0
for i in range(m):
    acc += 2*r
    for j in [i,m-i-1]:
        if j:
            acc += (2 + sqrt(2)) * r
            acc += (2*(j-1)*j/2 + 2*sqrt(2)*(j-1)) * r
print('%.12f' % (acc/(m**2)))


m,R=map(int, input().split())
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)

m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m,R=list(map(int, input().split()))
print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)


m, r = list(map(int, input().split()))

answer = 0
from math import sqrt


def fef(vev):
    if vev == 0:
        return 0
    if vev <= 1:
        return 2 * r + sqrt(2) * r
    curr =  2 * r + sqrt(2) * r
    curr += (vev - 1) * (2 * r + sqrt(2)  *2 * r)

    curr += r * (vev - 1) * (vev - 2)
    return curr



for i in range(m):
    answer += fef(i)
    answer += fef(m - 1- i)
    answer += 2 * r

print(answer / (m ** 2))


m,R=list(map(int, input().split()))

print((2*m/3-2+22/m/3-4/m/m+2**.5*(2-4/m+2/m/m))*R)



# Made By Mostafa_Khaled


m, r = list(map(int, input().split()))
res, sq2 = 0, (2**.5)
for i in range(1, m):
    res += 2 + sq2 + 2 * sq2 * (i-1) + (i-1) * i
res = (res + m) * 2 * r
print(res / (m * m))