// 2018复试第三题.cpp : 定义控制台应用程序的入口点。
/*骨牌。 有2*n 的地板,用1*2和 2*1 的骨牌进行铺地板。问共有多少种情况。 结果对 999983 取余 。 1<=n<=10000 。 样例:
6
输出:
13*/
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
const int maxn = 10010;
int a[maxn];
int _tmain(int argc, _TCHAR* argv[])
{
int n;
scanf("%d",&n);
a[1] = 1;
a[2] = 2;
for(int i = 3;i<=n;i++){
a[i] = (a[i-1] + a[i-2])%999983;
}
printf("%d\n",a[n]);
system("pause");
return 0;
}