#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 */
scalar_t__ EOF;
double pow(int, double);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, int *, int *);
int main() {
  int n, m, i;
  double S;
  while (scanf("%d %d", &n, &m) != EOF) {
    S = n;
    for (i = 2; i <= m; i++) {
      S += pow(n, pow((1.0 / 2), (i - 1)));
    }
    printf("%.2lf\n", S);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11cd <main+0x9d>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11b7 <main+0x87>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
xor    %edi,%edi
call   1050 <pow@plt>
mov    -0x1c(%rbp),%edi
call   1050 <pow@plt>
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <main+0x44>
movsd  -0x18(%rbp),%xmm0
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2e8d(%rip),%rbx
cmp    (%rbx),%rax
jne    1171 <main+0x41>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe90(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
jmp    11af <main+0x7f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1040 <scanf@plt>
cmp    (%rbx),%rax
je     1160 <main+0x30>
mov    0xc(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
cmpl   $0x2,0x8(%rsp)
jl     1190 <main+0x60>
xor    %edi,%edi
movsd  %xmm0,0x10(%rsp)
movsd  0xe2f(%rip),%xmm0
call   1050 <pow@plt>
mov    %ebp,%edi
call   1050 <pow@plt>
addsd  0x10(%rsp),%xmm0
cmpl   $0x3,0x8(%rsp)
jl     1190 <main+0x60>
mov    $0x2,%r14d
movsd  %xmm0,0x10(%rsp)
mov    0xc(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
add    $0x1,%r14d
xor    %edi,%edi
call   1050 <pow@plt>
mov    %ebp,%edi
call   1050 <pow@plt>
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
cmp    0x8(%rsp),%r14d
jl     11f0 <main+0xc0>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 0, i32* %1
br label %6
6: ; preds = %29, %0
%7 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %32
10: ; preds = %6
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
store double %12, double* %5
store i32 2, i32* %4
br label %13
13: ; preds = %26, %10
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = load i32, i32* %2
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 1
%21 = sitofp i32 %20 to double
%22 = call double @pow(i32 0, double %21)
%23 = call double @pow(i32 %18, double %22)
%24 = load double, double* %5
%25 = fadd double %24, %23
store double %25, double* %5
br label %26
26: ; preds = %17
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %13
29: ; preds = %13
%30 = load double, double* %5
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %30)
br label %6
32: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %36, label %8
8: ; preds = %0, %30
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 2
br i1 %12, label %30, label %13
13: ; preds = %8
%14 = call double @pow(i32 0, double 1.000000e+00)
%15 = call double @pow(i32 %9, double %14)
%16 = fadd double %15, %10
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 2
br i1 %18, label %19, label %30
19: ; preds = %13, %19
%20 = phi double [ %27, %19 ], [ %16, %13 ]
%21 = phi i32 [ %22, %19 ], [ 2, %13 ]
%22 = add nuw nsw i32 %21, 1
%23 = load i32, i32* %1
%24 = sitofp i32 %21 to double
%25 = call double @pow(i32 0, double %24)
%26 = call double @pow(i32 %23, double %25)
%27 = fadd double %20, %26
%28 = load i32, i32* %2
%29 = icmp slt i32 %22, %28
br i1 %29, label %19, label %30
30: ; preds = %19, %13, %8
%31 = phi double [ %10, %8 ], [ %16, %13 ], [ %27, %19 ]
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%34 = load i64, i64* @EOF
%35 = icmp eq i64 %33, %34
br i1 %35, label %36, label %8
36: ; preds = %30, %0
ret i32 0
}