#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, scalar_t__);
int /*<<< orphan*/ scanf(char *, ...);
scalar_t__ shit(double, double);
int main(int argc, char *argv[]) {
  int n;
  double x, y, a, b, r, p, k;
  scanf("%i %lf", &n, &r);
  double fuck = 3.14159265358979 * r * 2;
  scanf("%lf %lf", &x, &y);
  p = x;
  k = y;
  while (--n) {
    scanf("%lf %lf", &a, &b);
    fuck += shit(a - x, b - y);
    x = a;
    y = b;
  }
  printf("%.2lf", fuck + shit(x - p, y - k));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  0xea4(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  0xe8f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
lea    0xe96(%rip),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     120d <main+0xdd>
lea    0xe5a(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
call   1040 <shit@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11a4 <main+0x74>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
call   1040 <shit@plt>
movsd  -0x60(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rsi
lea    0xdd5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x48(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x48(%rsp),%xmm0
mulsd  0xea1(%rip),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xe9f(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
addl   $0xffffffff,0xc(%rsp)
movsd  %xmm1,0x40(%rsp)
movsd  %xmm0,0x38(%rsp)
je     1224 <main+0xf4>
lea    0xe64(%rip),%r14
lea    0x30(%rsp),%r15
lea    0x28(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x30(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
subsd  0x18(%rsp),%xmm1
call   1040 <shit@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x28(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
addl   $0xffffffff,0xc(%rsp)
jne    11c0 <main+0x90>
subsd  0x38(%rsp),%xmm0
subsd  0x40(%rsp),%xmm1
call   1040 <shit@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%rsi
lea    0xdc8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%i %lf\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [6 x i8] c"%.2lf\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %6, double* %11)
%16 = load double, double* %11
%17 = fmul double 0x400921FB54442D11, %16
%18 = fmul double %17, 2.000000e+00
store double %18, double* %14
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %7, double* %8)
%20 = load double, double* %7
store double %20, double* %12
%21 = load double, double* %8
store double %21, double* %13
br label %22
22: ; preds = %26, %2
%23 = load i32, i32* %6
%24 = add nsw i32 %23, -1
store i32 %24, i32* %6
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %40
26: ; preds = %22
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %9, double* %10)
%28 = load double, double* %9
%29 = load double, double* %7
%30 = fsub double %28, %29
%31 = load double, double* %10
%32 = load double, double* %8
%33 = fsub double %31, %32
%34 = call i64 @shit(double %30, double %33)
%35 = sitofp i64 %34 to double
%36 = load double, double* %14
%37 = fadd double %36, %35
store double %37, double* %14
%38 = load double, double* %9
store double %38, double* %7
%39 = load double, double* %10
store double %39, double* %8
br label %22
40: ; preds = %22
%41 = load double, double* %14
%42 = load double, double* %7
%43 = load double, double* %12
%44 = fsub double %42, %43
%45 = load double, double* %8
%46 = load double, double* %13
%47 = fsub double %45, %46
%48 = call i64 @shit(double %44, double %47)
%49 = sitofp i64 %48 to double
%50 = fadd double %41, %49
%51 = fptosi double %50 to i64
%52 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %51)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%i %lf\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [6 x i8] c"%.2lf\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = bitcast i32* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = bitcast double* %7 to i8*
%14 = bitcast double* %8 to i8*
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, double* %8)
%16 = load double, double* %8
%17 = fmul double %16, 0x400921FB54442D11
%18 = fmul double %17, 2.000000e+00
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %4, double* %5)
%20 = load double, double* %4
%21 = load double, double* %5
%22 = load i32, i32* %3
%23 = add nsw i32 %22, -1
store i32 %23, i32* %3
%24 = icmp eq i32 %23, 0
br i1 %24, label %42, label %25
25: ; preds = %2, %25
%26 = phi double [ %36, %25 ], [ %18, %2 ]
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %6, double* %7)
%28 = load double, double* %6
%29 = load double, double* %4
%30 = fsub double %28, %29
%31 = load double, double* %7
%32 = load double, double* %5
%33 = fsub double %31, %32
%34 = call i64 @shit(double %30, double %33)
%35 = sitofp i64 %34 to double
%36 = fadd double %26, %35
%37 = load double, double* %6
store double %37, double* %4
%38 = load double, double* %7
store double %38, double* %5
%39 = load i32, i32* %3
%40 = add nsw i32 %39, -1
store i32 %40, i32* %3
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %25
42: ; preds = %25, %2
%43 = phi double [ %21, %2 ], [ %38, %25 ]
%44 = phi double [ %20, %2 ], [ %37, %25 ]
%45 = phi double [ %18, %2 ], [ %36, %25 ]
%46 = fsub double %44, %20
%47 = fsub double %43, %21
%48 = call i64 @shit(double %46, double %47)
%49 = sitofp i64 %48 to double
%50 = fadd double %45, %49
%51 = fptosi double %50 to i64
%52 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %51)
ret i32 0
}