#include <bits/stdc++.h>
using namespace std;
int a[200005], dp[200005];
int pv[200005];
int c, n;
bool solve(int i) {
  int cur = c;
  int j = pv[c];
  if (pv[c] < i) j = i;
  while (cur > 0 && j > 0) {
    cur -= min(dp[j], cur / j) * j;
    if (pv[j - 1] < i && i < j)
      j = i;
    else
      j = pv[j - 1];
    if (j > cur) j = cur;
  }
  if (cur > 0) return 1;
  return 0;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    dp[a[i]]++;
  }
  pv[0] = -1;
  for (int i = 1; i <= c; i++) {
    if (dp[i] > 0)
      pv[i] = i;
    else
      pv[i] = pv[i - 1];
  }
  for (int i = 0; i <= c; i++) {
    dp[i]++;
    if (solve(i)) {
      printf("%d\n", i);
      return 0;
    }
    dp[i]--;
  }
  printf("Greed is good\n");
}
