int main() { int N,i,j; int f[20]={1,1,2}; scanf(“%d”,&N); for(i=3;i<=N;i++) { f[i]=f[i-1]+f[i-2]+f[i-3]; } printf(“%d”,f[N]);
return 0;
}