#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 main(void) {
  int i;
  double a, sum;
  while (scanf("%lf", &a) != EOF) {
    sum = a;
    for (i = 1; i < 10; i++) {
      if (i % 2 == 1) {
        a *= 2.0;
      } else {
        a /= 3.0;
      }
      sum += a;
    }
    printf("%.8lf\n", sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     11de <main+0xbe>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11c8 <main+0xa8>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1195 <main+0x75>
movsd  0xe82(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11ab <main+0x8b>
movsd  -0x10(%rbp),%xmm0
movsd  0xe5e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1160 <main+0x40>
movsd  -0x18(%rbp),%xmm0
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed9(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    0x2eaa(%rip),%r12
cmp    (%r12),%rax
je     11d7 <main+0xb7>
lea    0xebd(%rip),%r14
lea    0xeb2(%rip),%r15
mov    %rsp,%rbx
nopl   0x0(%rax)
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm1,(%rsp)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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