#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 *, long long);
int scanf(char *, int *);
int main() {
  long long a[90];
  int i, n;
  a[0] = 1;
  a[1] = 1;
  for (i = 2; i < 81; i++) {
    a[i] = a[i - 1] + a[i - 2];
  }
  while (scanf("%d", &n) == 1) {
    if (n == 0) {
      break;
    } else {
      printf("%lld\n", a[n]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x2e0(%rbp)
movq   $0x1,-0x2d8(%rbp)
movl   $0x2,-0x2e4(%rbp)
cmpl   $0x51,-0x2e4(%rbp)
jge    11a8 <main+0x88>
mov    -0x2e4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x2e0(%rbp,%rax,8),%rcx
ff
mov    -0x2e4(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x2e0(%rbp,%rax,8),%rcx
ff
movslq -0x2e4(%rbp),%rax
mov    %rcx,-0x2e0(%rbp,%rax,8)
ff
mov    -0x2e4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2e4(%rbp)
jmp    1152 <main+0x32>
jmp    11ad <main+0x8d>
lea    0xe4c(%rip),%rdi
lea    -0x2e8(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11fb <main+0xdb>
cmpl   $0x0,-0x2e8(%rbp)
jne    11db <main+0xbb>
jmp    11fb <main+0xdb>
movslq -0x2e8(%rbp),%rax
mov    -0x2e0(%rbp,%rax,8),%rsi
ff
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
jmp    11ad <main+0x8d>
xor    %eax,%eax
add    $0x2f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2e0,%rsp
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x2,0x20(%rsp)
mov    $0x2,%eax
mov    $0x5,%ecx
nopl   0x0(%rax,%rax,1)
add    -0x10(%rsp,%rcx,8),%rax
mov    %rax,(%rsp,%rcx,8)
mov    -0x8(%rsp,%rcx,8),%rdx
add    %rax,%rdx
mov    %rdx,0x8(%rsp,%rcx,8)
add    %rdx,%rax
mov    %rax,0x10(%rsp,%rcx,8)
add    $0x3,%rcx
cmp    $0x53,%rcx
jne    1150 <main+0x30>
lea    0xe91(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11d7 <main+0xb7>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     11d7 <main+0xb7>
lea    0xe76(%rip),%r14
lea    0xe6c(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
cltq
mov    0x10(%rsp,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11d7 <main+0xb7>
mov    0xc(%rsp),%eax
test   %eax,%eax
jne    11b0 <main+0x90>
xor    %eax,%eax
add    $0x2e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [90 x i64]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [90 x i64], [90 x i64]* %2, i64 0, i64 0
store i64 1, i64* %5
%6 = getelementptr inbounds [90 x i64], [90 x i64]* %2, i64 0, i64 1
store i64 1, i64* %6
store i32 2, i32* %3
br label %7
7: ; preds = %25, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 81
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 [90 x i64], [90 x i64]* %2, 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 [90 x i64], [90 x i64]* %2, 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 [90 x i64], [90 x i64]* %2, 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 = %42, %28
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %43
32: ; preds = %29
%33 = load i32, i32* %4
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %32
br label %43
36: ; preds = %32
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [90 x i64], [90 x i64]* %2, i64 0, i64 %38
%40 = load i64, i64* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %40)
br label %42
42: ; preds = %36
br label %29
43: ; preds = %35, %29
ret i32 0
}

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