#include <bits/stdc++.h>
using namespace std;
const int MAX_N = (int)2e5 + 123;
const int inf = (int)1e9 + 123;
using namespace std;
int n, c;
int a[MAX_N], cnt[MAX_N];
int b[MAX_N];
vector<int> q;
void solve(int x) {
  int now = c;
  cnt[x]++;
  int id = int((q).size()) - 1;
  bool not_used = 1;
  while (now > 0) {
    int hey = min(id, b[now]);
    if (hey == -1) break;
    if (not_used && x <= now && x >= q[hey]) {
      now -= min(cnt[x], now / x) * x;
      not_used = 0;
      if (cnt[x] > 1) id = b[x] - 1;
    } else
      now -= min(cnt[q[hey]], now / q[hey]) * q[hey], id = hey - 1;
  }
  if (now) {
    printf("%d", x);
    exit(0);
  }
  cnt[x]--;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    q.push_back(a[i]);
  }
  sort(q.begin(), q.end());
  q.resize(unique(q.begin(), q.end()) - q.begin());
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) cnt[a[i]]++;
  for (int i = 1, j = -1; i <= c; i++) {
    while (j + 1 < int((q).size()) && q[j + 1] <= i) j++;
    b[i] = j;
  }
  for (int best = 0; best <= c; best++) solve(best);
  printf("Greed is good");
  return 0;
}
