// rec_4.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream"
using namespace std;
int sayac=0;
void yaz(int k)
{
	sayac++;
	if(k<=1)
		return;
	yaz(k-1);
	yaz(k-2);
	yaz(k-3);
	cout<<k<<endl;
}

int _tmain(int argc, _TCHAR* argv[])
{
	yaz(4);
	cout<<endl;
	cout<<sayac<<endl;
	system("pause");
	return 0;
}

