#include <stdio.h>

int main() 
{
    int n;
    while (scanf("%d", &n) != EOF) { // 注意 while 处理多个 case
        // 64 位输出请用 printf("%lld") to 
        int sum = 1;
        int a = 0;
        int b = 0;
        for(int i = 2;i < n;i++)
        {
            sum += a;
            a = b;
            b = sum;
            
        }
        printf("%d\n",sum + a + b);
    }
    return 0;
}