#include<stdio.h>
#include<stdlib.h> //·¥´ý
#include<string>
#include<math.h>
#define INT long long int
using namespace std;
char in[100], out[100];

int n, t;
int f(int c, int m, int d){
	if( c>0 and c%3==0) m++;
	if( d>t ) return 0;
	if(c==n and m==1) return 1;
	if(c>=n or m>1) return 0;
	return f(c+1,m,d+1)+f(c+2,m,d+1)+f(c+3,m,d+1);
}
int main(){
	for(int I = 1; I<=15; I++){
		sprintf(in,".%d.in",I);
        freopen(in,"w",stdout);
        n = I+25;
	    t = 15 - rand()%5;
		//scanf("%d", &n);
		printf("%d %d", n, t);
		sprintf(in,".%d.out",I);
        freopen(in,"w",stdout);
		printf("%d",f(0,0,1));
	}
}
