#include <bits/stdc++.h>
using namespace std;
const long long INF = 1 << 28;
const long long LINF = 1ll << 61;
inline long long getnum() {
  register long long r = 0;
  register bool ng = 0;
  register char c;
  c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') ng = 1, c = getchar();
  while (c >= '0' && c <= '9') r = r * 10 + c - '0', c = getchar();
  if (ng) r = -r;
  return r;
}
template <class T>
inline void putnum(T x) {
  if (x < 0) putchar('-'), x = -x;
  register short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
inline void putsp() { putchar(' '); }
inline void putendl() { putchar('\n'); }
inline char mygetchar() {
  register char c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  return c;
}
int n, c;
int a[200111];
set<pair<int, int> > s;
vector<pair<int, int> > tmps;
bool used[200111];
int cnt[200111];
int main() {
  c = getnum(), n = getnum();
  s.insert(make_pair(-c, 0));
  for (int i = 1; i <= n; i++) {
    a[i] = getnum();
  }
  sort(a + 1, a + n + 1);
  for (int i = n; i >= 1; i--) {
    tmps.clear();
    while (s.size() > 0 && -s.begin()->first > a[i]) {
      int x = s.begin()->second, y = -s.begin()->first + x;
      s.erase(s.begin());
      tmps.push_back(make_pair(-a[i], x));
      tmps.push_back(make_pair(-(y - (x + a[i])), x + a[i]));
    }
    for (int j = 0; j < tmps.size(); j++) {
      s.insert(tmps[j]);
    }
  }
  for (auto x : s) {
    used[x.second] = 1;
  }
  int tmp = c;
  for (int i = n; i >= 1; i--) {
    if (tmp >= a[i]) {
      cnt[a[i]]++;
      cnt[tmp + 1]--;
      tmp -= a[i];
    }
  }
  int sum = 0;
  for (int i = 1; i <= c; i++) {
    sum += cnt[i];
    if (sum > 0 && !used[c - i]) {
      cout << i << endl;
      return 0;
    }
  }
  puts("Greed is good");
  return 0;
}
