#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 *, int);
scalar_t__ scanf(char *, int *);
int main() {
  int s, d, n;
  while (scanf("%d", &n) != EOF) {
    s = 1;
    d = 1;
    while (d < n) {
      s = (s + 1) * 2;
      d = d + 1;
    }
    printf("%d\n", s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     1197 <main+0x77>
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1183 <main+0x63>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea8(%rip),%rbx
cmp    (%rbx),%rax
jne    1153 <main+0x33>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xea9(%rip),%r14
lea    0xe9f(%rip),%r15
lea    0x4(%rsp),%r12
jmp    1188 <main+0x68>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
cmp    (%rbx),%rax
je     1145 <main+0x25>
mov    0x4(%rsp),%edx
mov    $0x1,%esi
cmp    $0x2,%edx
jl     1170 <main+0x50>
lea    -0x1(%rdx),%ecx
add    $0xfffffffe,%edx
mov    %ecx,%eax
and    $0x7,%eax
mov    $0x1,%esi
cmp    $0x7,%edx
jb     11ce <main+0xae>
and    $0xfffffff8,%ecx
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
shl    $0x8,%esi
add    $0x1fe,%esi
add    $0xfffffff8,%ecx
jne    11c0 <main+0xa0>
test   %eax,%eax
je     1170 <main+0x50>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %esi,%esi
add    $0x2,%esi
add    $0xffffffff,%eax
jne    11e0 <main+0xc0>
jmp    1170 <main+0x50>

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

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