#include <bits/stdc++.h>
using namespace std;
const int MaxC = 200005, MaxN = MaxC;
int cost[MaxN], c, n;
pair<int, int> a[MaxN];
int nxt[MaxN];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> c >> n;
  for (int i = 1; i <= n; ++i) cin >> cost[i];
  sort(cost + 1, cost + n + 1);
  for (; cost[n] > c; --n)
    ;
  int cc = 0;
  for (int i = 1; i <= n; ++i) {
    if (cost[i] == cost[i - 1])
      a[cc].second++;
    else
      a[++cc] = make_pair(cost[i], 1);
  }
  n = cc;
  for (int i = c, j = cc; i > 0; --i) {
    if (a[j].first > i) --j;
    nxt[i] = j;
  }
  for (int i = 1; i <= c; ++i) {
    int rem = c, j = cc;
    if (i > a[j].first) rem -= i;
    for (; rem > 0 && j > 0;) {
      rem -= min(a[j].second, rem / a[j].first) * a[j].first;
      int nxt_label = min(nxt[rem], j - 1);
      if (a[nxt_label].first <= i && a[j].first >= i) {
        if (rem >= i) rem -= i;
      }
      j = nxt_label;
    }
    if (rem) {
      cout << i << endl;
      return 0;
    }
  }
  cout << "Greed is good" << endl;
  return 0;
}
