#include <bits/stdc++.h>
using namespace std;
long long c;
int n;
long long s[200005];
long long pp[200005];
long long pref[200005];
bool okay(long long amm, int stp) {
  int lw = 0, hg = n - stp + 1;
  while (lw < hg) {
    int mid = (lw + hg + 1) / 2;
    if (pp[stp + mid - 1] - pp[stp - 1] > amm)
      hg = mid - 1;
    else
      lw = mid;
  }
  amm -= (pp[stp + lw - 1] - pp[stp - 1]);
  if (amm == 0) return true;
  lw = stp + lw, hg = n + 1;
  while (lw < hg) {
    int mid = (lw + hg) / 2;
    if (s[mid] > amm)
      lw = mid + 1;
    else
      hg = mid;
  }
  if (lw == n + 1) return false;
  return okay(amm, lw);
}
void init() {
  scanf("%I64d%d", &c, &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &s[i]);
  sort(s + 1, s + n + 1, [&](long long x, long long y) { return x > y; });
  s[n + 1] = 0;
  pp[0] = pref[0] = 0;
  for (int i = 1; i <= n; i++) {
    pp[i] = pp[i - 1] + s[i];
    if (pref[i - 1] + s[i] <= c) {
      pref[i] = pref[i - 1] + s[i];
    } else
      pref[i] = pref[i - 1];
  }
}
void process() {
  for (int i = n - 1; i >= 0; i--) {
    long long lb = s[i + 1], hb = s[i];
    if (i == 0) hb = c - 1;
    for (int j = lb; j <= hb; j++) {
      long long tmpc = c - pref[i];
      if (tmpc >= j) {
        tmpc -= j;
      }
      if (!okay(tmpc, i + 1)) {
        printf("%d\n", j);
        return;
      }
    }
  }
  printf("Greed is good\n");
}
int main() {
  init();
  process();
  return 0;
}
