// Arup Guha
// 5/2/2014
// Solution to UCF HS Contest Problem: Dinner Games

import java.util.*;
import java.io.*;

public class dinner {

	final public static int MAX = 100;
	final public static int[] DENOM = {2,5,10};

	public static void main(String[] args) throws Exception {

		Scanner fin = new Scanner(new File("dinner.in"));

		// Store all answers here. ans[i] stores # ways to pay i dollars.
		long[] ans = new long[MAX+1];
		ans[0] = 1;
		ans[1] = 0;

		// Key is that we build ans[i] by either paying last with a $2, $5 or $10 bill.
		for (int i=2; i<=MAX; i++)
			for (int j=0; j<DENOM.length; j++)
				if (i >= DENOM[j])
					ans[i] += ans[i-DENOM[j]];

		// Process all cases.
		int numCases = fin.nextInt();
		for (int loop=1; loop<=numCases; loop++)
			System.out.println("Dinner #"+loop+": "+ans[fin.nextInt()]);
		fin.close();
	}
}