// Arup Guha
// 10/6/2013
// Solution to 2011 MCPC Problem F: Shut the Box

import java.util.*;

public class f {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		// Get the data.
		int n = stdin.nextInt();
		int k = stdin.nextInt();
		int loop = 1;

		// Process each case.
		while (n != 0) {

			// Get vals to match.
			int[] vals = new int[k];
			for (int i=0; i<k; i++)
				vals[i] = stdin.nextInt();
			System.out.println("Game "+loop+": "+solve(vals,n));;

			// Get next case.
			loop++;
			n = stdin.nextInt();
			k = stdin.nextInt();
		}
	}

	public static int solve(int[] vals, int n) {

		// Keep track of what we've seen.
		boolean[] seen = new boolean[1 << n];
		seen[seen.length-1] = true;

		// Start list with one state.
		LinkedList<Integer> q = new LinkedList<Integer>();
		q.offer(seen.length-1);
		int best = 0;

		// Go through each item, one by one.
		for (int i=0; i<vals.length; i++) {

			// No state to move from.
			if (q.size() == 0) break;

			LinkedList<Integer> next = new LinkedList<Integer>();

			// Empty out the current queue.
			while (q.size() > 0) {
				int mask = q.poll();
				if (n-Integer.bitCount(mask) > best)
					best = n-Integer.bitCount(mask);

				addQueue(next, mask, vals[i], seen, n);
			}

			// Reassign.
			q = next;
		}

		// Must do one last time to see if the last number helped us.
		while (q.size() > 0) {
			int mask = q.poll();
			if (n-Integer.bitCount(mask) > best)
				best = n-Integer.bitCount(mask);
		}

		return best;
	}

	// Wrapper function to add each possible next state from mask where we must subtract out item.
	public static void addQueue(LinkedList<Integer> next, int mask, int item, boolean[] seen, int n) {
		addQueueRec(next, mask, item, seen, n-1);
	}

	// Recursive call that adds all states indicated by bit k.
	public static void addQueueRec(LinkedList<Integer> next, int mask, int item, boolean[] seen, int k) {

		// Hey, we have a match!
		if (item == 0) {
			if (!seen[mask]) next.offer(mask);
			seen[mask] = true;
		}

		// No match.
		else if (k < 0) return;

		// Recurse.
		else {

			// If this bit is on and doesn't take us over, try this option.
			if (((mask & (1 << k)) > 0) && k+1 <= item)
				addQueueRec(next, mask - (1 << k), item-k-1, seen, k-1);

			// We always have this option.
			addQueueRec(next, mask, item, seen, k-1);
		}
	}
}