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