#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
const int M = 2e5 + 10;
int cnt[M];
int pick[M];
bool greedy_fail(int m, int x) {
  int last = INF;
  while (m) {
    int cur = pick[min(m, last - 1)];
    if (x <= m && x < last) cur = max(cur, x);
    if (cur == 0) break;
    int used = min(cnt[cur], m / cur);
    m -= used * cur;
    last = cur;
  }
  return m;
}
int main() {
  int m, n;
  scanf("%d%d", &m, &n);
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  int last = 0;
  for (int i = 1; i <= m; ++i) {
    if (cnt[i]) last = i;
    pick[i] = last;
  }
  int ret;
  for (ret = 1; ret <= m; ++ret) {
    ++cnt[ret];
    if (greedy_fail(m, ret)) break;
    --cnt[ret];
  }
  if (ret > m) {
    puts("Greed is good");
  } else {
    printf("%d\n", ret);
  }
  return 0;
}
