public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		all();
		solve();
		while ((line = in.readLine()) != null && line.length() != 0) {
			int n = Integer.parseInt(line.trim());
			if (n <= 0)
				break;
			if (n >= 0 && n <= 180 && p[n] != 0 && c[n] != 0) {
				out.append("NUMBER OF COMBINATIONS THAT SCORES " + n + " IS "
						+ c[n] + ".\n");
				out.append("NUMBER OF PERMUTATIONS THAT SCORES " + n + " IS "
						+ p[n] + ".\n");
			} else
				out.append("THE SCORE OF " + n
						+ " CANNOT BE MADE WITH THREE DARTS.\n");
			out.append("**********************************************************************\n");
		}
		System.out.print(out);
		System.out.println("END OF OUTPUT");
	}