#include<stdio.h>
int a[1000005];
int main()
{
    int n;
    scanf("%d",&n);
    //a[0] = 0;
    a[0] = 2;
    a[1] = 1;
    //if(n>=3)
    //{
    for(int i=2; i<100; i++)
    {
        a[i] = a[i-1]+a[i-2];
       // printf("***%d",a[i]);
    }
    //}
    printf("%d",a[n]);
    return 0;
}
