#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 1e2;
int a[maxn] = {0}, maxa[maxn] = {0}, can[maxn] = {0}, maxc[maxn] = {0},
    cnt[maxn] = {0};
int getint() {
  char ch;
  int b = 1;
  for (ch = getchar(); ch > '9' || ch < '0'; ch = getchar())
    if (ch == '-') b = -1;
  int num = ch - '0';
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    num = num * 10 + ch - '0';
  return num * b;
}
int dfs(int x) {
  if (can[x] != -1) return can[x];
  if (maxa[x])
    return can[x] = dfs(x - maxa[x]);
  else
    return can[x] = 0;
}
int main() {
  memset(can, -1, sizeof(can));
  int c = getint();
  int n = getint();
  for (int i = 1; i <= n; i++) {
    a[i] = getint();
    cnt[a[i]]++;
  }
  sort(a + 1, a + n + 1);
  int l = 1;
  for (int i = 1; i <= c; i++) {
    if (a[l] == i)
      maxa[i] = a[l];
    else
      maxa[i] = maxa[i - 1];
    while (a[l] == i) l++;
  }
  for (int i = 1; i <= c; i++) {
    int cur = c;
    int now = maxa[c];
    bool use = false;
    while (cur > 0) {
      if (!use && i >= now) {
        cur -= i;
        use = true;
        now = maxa[cur];
      } else {
        if (!now) break;
        int num = min(cnt[now], cur / now);
        cur -= num * now;
        now = min(maxa[now - 1], maxa[cur]);
      }
    }
    if (cur > 0) {
      printf("%d\n", i);
      return 0;
    }
  }
  printf("Greed is good\n");
  return 0;
}
