#include<iostream>
using namespace std;
long cattle(int n);
int main()
{
int i;
for (i = 1;i <= 10;i++)
{
cout << cattle(i) << '\t';
}
cout << endl;
return 0;
}
long cattle(int n)
{
if (n == 1 || n == 2 || n == 3)
{
return 1;
}
else
{
return cattle(n - 1) + cattle(n - 3);
}
}