#include <iostream>
#include <cstdlib>
using namespace std;
#define ROWS 4
#define COLS 4
int f(int row, int col) {
if(row == 0 && col == 0)
return 1;
int result = 0;
if(row > 0)
result += f(row - 1, col);
if(row > 0 && col > 0)
result += f(row - 1, col - 1);
if(col > 0)
result += f(row, col - 1);
return result;
}
int main() {
cout << f(ROWS - 1,COLS - 1);
system("pause");
}