#!/usr/sbin/python
# -*- coding: utf-8 -*-
import math
while True:
    try:
        int_mouth = int(input())    # 输入int型标识mouth第几个月
        mouth_1 = 1
        mouth_2 = 1
        result_num_all = []
        i = 1
        while i < int_mouth:
            result_num_all.append(mouth_2)
            mouth_1, mouth_2 = mouth_2, mouth_1 + mouth_2
            i += 1
            '''
            第1个月,1只
            第2个月,1只
            第3个月,2只1+1
            第4个月,3只2+1
            第5个月,5只3+2
            第6个月,8只4+3+1
            '''     # 算法
        # 输出兔子总数int型
        print(result_num_all[-1])
    except:
        break