#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;
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *, int *);
int main() {
  double num0 = 0, num1 = 0, num2 = 0;
  int n, i;
  while (scanf("%lf%d", &num0, &n) != EOF) {
    i = 0;
    num1 = num0;
    while (i < n) {
      num2 = num1 * (2 / 3.0) + num0 / (3 * num1 * num1);
      num1 = num2;
      i++;
    }
    printf("%0.6f\n", num2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e86(%rip),%rcx
cmp    (%rcx),%rax
je     11eb <main+0xcb>
movl   $0x0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11d5 <main+0xb5>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe6e(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
mulsd  -0x18(%rbp),%xmm2
divsd  %xmm2,%xmm1
movsd  0xe50(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    117c <main+0x5c>
movsd  -0x20(%rbp),%xmm0
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
jmp    1147 <main+0x27>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
movq   $0x0,0x10(%rsp)
lea    0xed3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2e95(%rip),%r13
cmp    0x0(%r13),%rax
jne    1169 <main+0x49>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
xorpd  %xmm0,%xmm0
movsd  0xe8b(%rip),%xmm3
movsd  0xe8b(%rip),%xmm4
lea    0xe92(%rip),%r14
lea    0xe85(%rip),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%rbx
jmp    11d8 <main+0xb8>
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x18(%rsp)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0xe3e(%rip),%xmm4
movsd  0xe2e(%rip),%xmm3
cmp    0x0(%r13),%rax
je     1159 <main+0x39>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11a0 <main+0x80>
movsd  0x10(%rsp),%xmm5
movapd %xmm5,%xmm0
cmp    $0x1,%eax
je     123d <main+0x11d>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movapd %xmm5,%xmm0
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm5,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm5,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
add    $0xfffffffe,%ecx
jne    1200 <main+0xe0>
test   $0x1,%al
je     11a0 <main+0x80>
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
divsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
jmp    11a0 <main+0x80>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lf%d\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%0.6f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca i32
%3 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %1, i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %46, label %8
8: ; preds = %0, %40
%9 = phi double [ %41, %40 ], [ 0.000000e+00, %0 ]
%10 = load double, double* %1
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %40
13: ; preds = %8
%14 = and i32 %11, 1
%15 = icmp eq i32 %11, 1
br i1 %15, label %31, label %16
16: ; preds = %13
%17 = and i32 %11, -2
br label %18
18: ; preds = %18, %16
%19 = phi double [ %10, %16 ], [ %28, %18 ]
%20 = phi i32 [ 0, %16 ], [ %29, %18 ]
%21 = fmul double %19, 3.000000e+00
%22 = fmul double %19, %21
%23 = fdiv double %10, %22
%24 = call double @llvm.fmuladd.f64(double %19, double 0x3FE5555555555555, double %23)
%25 = fmul double %24, 3.000000e+00
%26 = fmul double %24, %25
%27 = fdiv double %10, %26
%28 = call double @llvm.fmuladd.f64(double %24, double 0x3FE5555555555555, double %27)
%29 = add i32 %20, 2
%30 = icmp eq i32 %29, %17
br i1 %30, label %31, label %18
31: ; preds = %18, %13
%32 = phi double [ undef, %13 ], [ %28, %18 ]
%33 = phi double [ %10, %13 ], [ %28, %18 ]
%34 = icmp eq i32 %14, 0
br i1 %34, label %40, label %35
35: ; preds = %31
%36 = fmul double %33, 3.000000e+00
%37 = fmul double %33, %36
%38 = fdiv double %10, %37
%39 = call double @llvm.fmuladd.f64(double %33, double 0x3FE5555555555555, double %38)
br label %40
40: ; preds = %35, %31, %8
%41 = phi double [ %9, %8 ], [ %32, %31 ], [ %39, %35 ]
%42 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %41)
%43 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %1, i32* %2)
%44 = load i64, i64* @EOF
%45 = icmp eq i64 %43, %44
br i1 %45, label %46, label %8
46: ; preds = %40, %0
ret i32 0
}