#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
long double pi = 3.1415926535897932384626433832795;
const int N = 2e5 + 10, lg = 31, MAXN = 1111;
long long mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long _gcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long _x1, _y1;
  long long d = _gcd(b % a, a, _x1, _y1);
  x = _y1 - (b / a) * _x1;
  y = _x1;
  return d;
}
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res *= a;
    a *= a;
    n >>= 1;
    a %= mod;
    res %= mod;
  }
  return res;
}
void term_res(string res) {
  cout << res;
  exit(0);
}
int n, cost, c[N], cnt[N], mx = 0, prv[N], nxt[N];
int cur_add;
set<int> coins;
bool can() {
  int cur_cost = cost, cur = mx;
  while (1) {
    if (cur == 0) return 0;
    cur_cost -= cur * min(cur_cost / cur, cnt[cur]);
    int tt = prv[cur_cost + 1];
    if (cur_cost >= cur_add && tt < cur_add) tt = cur_add;
    cur = min(tt, prv[cur]);
    if (cur_cost == 0) return 1;
  }
}
int main() {
  cin >> cost >> n;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    cnt[c[i]]++;
    mx = max(mx, c[i]);
  }
  cnt[0] = 1;
  cnt[200001] = 1;
  cnt[200002] = 1;
  int _prv = 0, _nxt = 0;
  while (cnt[_prv] == 0) _prv++;
  _nxt = _prv + 1;
  while (cnt[_nxt] == 0) _nxt++;
  while (_nxt != 200002) {
    prv[_nxt] = _prv;
    nxt[_prv] = _nxt;
    _prv = _nxt;
    int t_nxt = _nxt + 1;
    while (cnt[t_nxt] == 0) {
      t_nxt += 1;
    }
    for (int i = _nxt + 1; i < t_nxt; i++) {
      prv[i] = _nxt;
      nxt[i] = t_nxt;
    }
    _nxt = t_nxt;
  }
  for (int i = 1; i <= cost; i++) {
    cnt[i] += 1;
    cur_add = i;
    int tmx = mx;
    mx = max(mx, i);
    int temp = prv[nxt[i]];
    prv[nxt[i]] = i;
    if (!can()) {
      cout << i;
      return 0;
    }
    cnt[i] -= 1;
    prv[nxt[i]] = temp;
    mx = tmx;
  }
  cout << "Greed is good";
  return 0;
}
