#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 *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int dayPeopleReached = 5 / 2;
  int totPeopleReached = 0;
  for (int i = 0; i < n; i++) {
    totPeopleReached += dayPeopleReached;
    dayPeopleReached = (dayPeopleReached * 3) / 2;
  }
  printf("%d", totPeopleReached);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1186 <main+0x66>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x3,-0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <main+0x34>
mov    -0x10(%rbp),%esi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1148 <main+0x28>
cmp    $0x1,%eax
jne    114c <main+0x2c>
mov    $0x2,%edi
xor    %ecx,%ecx
jmp    1181 <main+0x61>
xor    %esi,%esi
jmp    118a <main+0x6a>
mov    %eax,%edx
and    $0xfffffffe,%edx
mov    $0x2,%edi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
add    %edi,%ecx
lea    (%rdi,%rdi,2),%esi
mov    %esi,%edi
shr    $0x1f,%edi
add    %esi,%edi
sar    %edi
add    %edi,%ecx
lea    (%rdi,%rdi,2),%esi
mov    %esi,%edi
shr    $0x1f,%edi
add    %esi,%edi
sar    %edi
add    $0xfffffffe,%edx
jne    1160 <main+0x40>
mov    %ecx,%esi
add    %edi,%esi
test   $0x1,%al
cmove  %ecx,%esi
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 2, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %5
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, %12
store i32 %14, i32* %4
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, 3
%17 = sdiv i32 %16, 2
store i32 %17, i32* %3
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %18
6: ; preds = %0
%7 = and i32 %4, 1
%8 = icmp eq i32 %4, 1
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = and i32 %4, -2
br label %21
11: ; preds = %21, %6
%12 = phi i32 [ undef, %6 ], [ %28, %21 ]
%13 = phi i32 [ 0, %6 ], [ %28, %21 ]
%14 = phi i32 [ 2, %6 ], [ %30, %21 ]
%15 = icmp eq i32 %7, 0
%16 = add nsw i32 %13, %14
%17 = select i1 %15, i32 %12, i32 %16
br label %18
18: ; preds = %11, %0
%19 = phi i32 [ 0, %0 ], [ %17, %11 ]
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
21: ; preds = %21, %9
%22 = phi i32 [ 0, %9 ], [ %28, %21 ]
%23 = phi i32 [ 2, %9 ], [ %30, %21 ]
%24 = phi i32 [ 0, %9 ], [ %31, %21 ]
%25 = add nsw i32 %22, %23
%26 = mul nsw i32 %23, 3
%27 = sdiv i32 %26, 2
%28 = add nsw i32 %25, %27
%29 = mul nsw i32 %27, 3
%30 = sdiv i32 %29, 2
%31 = add i32 %24, 2
%32 = icmp eq i32 %31, %10
br i1 %32, label %11, label %21
}