#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 *, long long);
scalar_t__ scanf(char *, int *);
int main() {
  int N, i;
  long long num[100];
  num[1] = 1;
  num[2] = 2;
  for (i = 3; i < 100; i++)
    num[i] = num[i - 1] + num[i - 2];
  while (scanf("%d", &N) != EOF) {
    printf("%lld\n", num[N]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x328(%rbp)
movq   $0x2,-0x320(%rbp)
movl   $0x3,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1193 <main+0x73>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x330(%rbp,%rax,8),%rcx
ff
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x330(%rbp,%rax,8),%rcx
ff
movslq -0xc(%rbp),%rax
mov    %rcx,-0x330(%rbp,%rax,8)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114f <main+0x2f>
jmp    1198 <main+0x78>
lea    0xe61(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e39(%rip),%rcx
cmp    (%rcx),%rax
je     11d5 <main+0xb5>
movslq -0x8(%rbp),%rax
mov    -0x330(%rbp,%rax,8),%rsi
ff
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
jmp    1198 <main+0x78>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x338,%rsp
movaps 0xecb(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movq   $0x3,0x28(%rsp)
mov    $0x3,%eax
mov    $0x7,%ecx
nopl   (%rax)
add    -0x18(%rsp,%rcx,8),%rax
mov    %rax,-0x8(%rsp,%rcx,8)
mov    -0x10(%rsp,%rcx,8),%rdx
add    %rax,%rdx
mov    %rdx,(%rsp,%rcx,8)
add    %rdx,%rax
mov    %rax,0x8(%rsp,%rcx,8)
add    %rdx,%rax
mov    %rax,0x10(%rsp,%rcx,8)
add    $0x4,%rcx
cmp    $0x67,%rcx
jne    1150 <main+0x30>
lea    0xe89(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e50(%rip),%r12
cmp    (%r12),%rax
je     11e3 <main+0xc3>
lea    0xe6e(%rip),%r14
lea    0xe64(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq 0xc(%rsp),%rax
mov    0x10(%rsp,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
jne    11c0 <main+0xa0>
xor    %eax,%eax
add    $0x338,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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