#include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <deque>
#include <algorithm>
#include <queue>
#include <cmath>
#include <map>
#include <complex>
#include <cstring>
#include <cfloat>
#include <iomanip>
#include <stack>
#include <bitset>
using namespace std;
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define repd(i, a, b) for(int i = (a); i > (b); i--)
#define forIt(it, a) for(__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define forRev(it, a) for(__typeof((a).rbegin()) it = (a).rbegin(); it != (a).rend(); it++)
#define ft(a) __typeof((a).begin())
#define ll long long
#define ld long double
#define fi first
#define se second
#define mk make_pair
#define pb push_back
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define Rep(i,n) for(int i = 0; i < (n); ++i)
#define bitcount(n) __builtin_popcountll(n)
#define pii pair<int, int>
typedef complex<ld> cplex;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef vector<ii> vii;
typedef vector<iii> viii;
const int N = 200000 + 7;
const int M = 1000 + 3;
const int inf = 1e9 + 7;
const long long linf = 1ll * inf * (inf - 1);
const double pi = acos(-1);
const double eps = 1e-6;
const bool multipleTest = false;
int c, n;
int st[N];
int prv[N];
vii list;
void solve() {
cin >> c >> n;
for(int i = 1; i <= n; ++i) {
int u; scanf("%d", &u);
st[u]++;
}
for(int i = 1; i <= c; ++i) if (st[i])
list.push_back(mk(i, st[i]));
int p = 0;
for(int cur = 1; cur <= c; ++cur) {
prv[cur] = -1;
while (p + 1 < list.size() && list[p + 1].first <= cur) ++p;
if (list[p].first <= cur) prv[cur] = p;
// cout << cur << " ";
// if (prv[cur] != -1) {
// cout << list[prv[cur]].first << " " << list[prv[cur]].second;
// }
// puts("");
}
for(int d = 1; d <= c; ++d) {
bool used = false;
int cur = c;
int cs = list.size();
while (cur > 0) {
int u = min(prv[cur], cs - 1);
if (u == -1 && used) break;
if (u == -1 || (!used && d >= list[u].first)) {
used = true;
if (cur >= d) cur -= d;
continue;
}
int gt = list[u].first, sl = list[u].second;
cs = u;
sl = min(sl, cur / gt);
cur -= sl * gt;
}
// cout << d << " " << cur << "\n";
if (cur > 0) {
cout << d << "\n";
return;
}
}
puts("Greed is good");
}
void createTest() {
freopen("in.txt", "w", stdout);
cout << 1 << "\n";
cout << 100000 << " " << 100000 << "\n";
for(int i = 1; i <= 100000; ++i) {
int u = rand();
int v = rand();
if (u > v) swap(u, v); printf("%d %d\n", u, v);
}
for(int i = 1; i <= 100000; ++i) {
int u = rand();
int v = rand();
if (u > v) swap(u, v); printf("%d %d\n", u, v);
}
}
int main() {
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
clock_t t1 = clock();
#endif
// createTest();
// return 0;
// freopen("out.txt", "w", stdout);
int Test = 1;
if (multipleTest) {
cin >> Test;
}
for(int i = 0; i < Test; ++i) {
// printf("Case #%d: ", i + 1);
solve();
}
//
#ifndef ONLINE_JUDGE
cout<<"\n" << 1.0 * (clock() - t1) / CLOCKS_PER_SEC<<endl;
#endif
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGlvPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8ZGVxdWU+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxxdWV1ZT4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8Y29tcGxleD4KI2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxjZmxvYXQ+CiNpbmNsdWRlIDxpb21hbmlwPgojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxiaXRzZXQ+CgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSByZXAoaSwgYSwgYikgZm9yKGludCBpID0gKGEpOyBpIDwgKGIpOyBpKyspCiNkZWZpbmUgcmVwZChpLCBhLCBiKSBmb3IoaW50IGkgPSAoYSk7IGkgP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AxKTsKY29uc3QgZG91YmxlIHBpID0gYWNvcygtMSk7CmNvbnN0IGRvdWJsZSBlcHMgPSAxZS02Owpjb25zdCBib29sIG11bHRpcGxlVGVzdCA9IGZhbHNlOwoKCmludCBjLCBuOwppbnQgc3RbTl07CgppbnQgcHJ2W05dOwp2aWkgbGlzdDsKCnZvaWQgc29sdmUoKSB7CiAgICBjaW4gPj4gYyA+PiBuOwogICAgZm9yKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKICAgICAgICBpbnQgdTsgc2NhbmYoIiVkIiwgJnUpOwogICAgICAgIHN0W3VdKys7CiAgICB9CiAgICAKICAgIGZvcihpbnQgaSA9IDE7IGkgPD0gYzsgKytpKSBpZiAoc3RbaV0pCiAgICAgICAgbGlzdC5wdXNoX2JhY2sobWsoaSwgc3RbaV0pKTsKICAgIGludCBwID0gMDsKICAgIAogICAgZm9yKGludCBjdXIgPSAxOyBjdXIgPD0gYzsgKytjdXIpIHsKICAgICAgICBwcnZbY3VyXSA9IC0xOwogICAgICAgIAogICAgICAgIHdoaWxlIChwICsgMSA8IGxpc3Quc2l6ZSgpICYmIGxpc3RbcCArIDFdLmZpcnN0IDw9IGN1cikgKytwOwogICAgICAgIGlmIChsaXN0W3BdLmZpcnN0IDw9IGN1cikgcHJ2W2N1cl0gPSBwOwovLyAgICAgICAgY291dCA8PCBjdXIgPDwgIiAiOwovLyAgICAgICAgaWYgKHBydltjdXJdICE9IC0xKSB7Ci8vICAgICAgICAgICAgY291dCA8PCBsaXN0W3BydltjdXJdXS5maXJzdCA8PCAiICIgPDwgbGlzdFtwcnZbY3VyXV0uc2Vjb25kOwovLyAgICAgICAgfQovLyAgICAgICAgcHV0cygiIik7CiAgICB9CiAgICAKICAgIAogICAgCiAgICAKICAgIGZvcihpbnQgZCA9IDE7IGQgPD0gYzsgKytkKSB7CiAgICAgICAgCiAgICAgICAgYm9vbCB1c2VkID0gZmFsc2U7CiAgICAgICAgCiAgICAgICAgaW50IGN1ciA9IGM7CiAgICAgICAgaW50IGNzID0gbGlzdC5zaXplKCk7CiAgICAgICAgd2hpbGUgKGN1ciA+IDApIHsKICAgICAgICAgICAgCiAgICAgICAgICAgIGludCB1ID0gbWluKHBydltjdXJdLCBjcyAtIDEpOwogICAgICAgICAgICBpZiAodSA9PSAtMSAmJiB1c2VkKSBicmVhazsKICAgICAgICAgICAgCiAgICAgICAgICAgIGlmICh1ID09IC0xIHx8ICghdXNlZCAmJiBkID49IGxpc3RbdV0uZmlyc3QpKSB7CiAgICAgICAgICAgICAgICB1c2VkID0gdHJ1ZTsKICAgICAgICAgICAgICAgIGlmIChjdXIgPj0gZCkgY3VyIC09IGQ7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAKICAgICAgICAgICAgaW50IGd0ID0gbGlzdFt1XS5maXJzdCwgc2wgPSBsaXN0W3VdLnNlY29uZDsKICAgICAgICAgICAgY3MgPSB1OwogICAgICAgICAgICAKICAgICAgICAgICAgc2wgPSBtaW4oc2wsIGN1ciAvIGd0KTsKICAgICAgICAgICAgY3VyIC09IHNsICogZ3Q7CiAgICAgICAgICAgIAogICAgICAgIH0KLy8gICAgICAgIGNvdXQgPDwgZCA8PCAiICIgPDwgY3VyIDw8ICJcbiI7CiAgICAgICAgaWYgKGN1ciA+IDApIHsKICAgICAgICAgICAgY291dCA8PCBkIDw8ICJcbiI7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICB9CiAgICAKICAgIAogICAgCiAgICAKICAgIHB1dHMoIkdyZWVkIGlzIGdvb2QiKTsKICAgIAogICAgCiAgICAKICAgIAogICAgCn0KCnZvaWQgY3JlYXRlVGVzdCgpIHsKICAgIGZyZW9wZW4oImluLnR4dCIsICJ3Iiwgc3Rkb3V0KTsKICAgIGNvdXQgPDwgMSA8PCAiXG4iOwogICAgY291dCA8PCAxMDAwMDAgPDwgIiAiIDw8IDEwMDAwMCA8PCAiXG4iOwogICAgZm9yKGludCBpID0gMTsgaSA8PSAxMDAwMDA7ICsraSkgewogICAgICAgIGludCB1ID0gcmFuZCgpOwogICAgICAgIGludCB2ID0gcmFuZCgpOwogICAgICAgIGlmICh1ID4gdikgc3dhcCh1LCB2KTsgcHJpbnRmKCIlZCAlZFxuIiwgdSwgdik7CiAgICB9CiAgICBmb3IoaW50IGkgPSAxOyBpIDw9IDEwMDAwMDsgKytpKSB7CiAgICAgICAgaW50IHUgPSByYW5kKCk7CiAgICAgICAgaW50IHYgPSByYW5kKCk7CiAgICAgICAgaWYgKHUgPiB2KSBzd2FwKHUsIHYpOyBwcmludGYoIiVkICVkXG4iLCB1LCB2KTsKICAgIH0KfQoKCgppbnQgbWFpbigpIHsKI2lmbmRlZiBPTkxJTkVfSlVER0UKICAgIGZyZW9wZW4oImluLnR4dCIsICJyIiwgc3RkaW4pOwogICAgY2xvY2tfdCB0MSA9IGNsb2NrKCk7CiNlbmRpZgogICAgLy8gICAgICAgICAgICBjcmVhdGVUZXN0KCk7CiAgICAvLyAgICAgICAgICAgIHJldHVybiAwOwogICAgLy8gICAgICAgIGZyZW9wZW4oIm91dC50eHQiLCAidyIsIHN0ZG91dCk7CiAgICAKICAgIAogICAgCiAgICAKICAgIGludCBUZXN0ID0gMTsKICAgIGlmIChtdWx0aXBsZVRlc3QpIHsKICAgICAgICBjaW4gPj4gVGVzdDsKICAgIH0KICAgIAogICAgZm9yKGludCBpID0gMDsgaSA8IFRlc3Q7ICsraSkgewogICAgICAgIC8vICAgICAgICAgICAgICAgIHByaW50ZigiQ2FzZSAjJWQ6ICIsIGkgKyAxKTsKICAgICAgICBzb2x2ZSgpOwogICAgfQogICAgLy8KI2lmbmRlZiBPTkxJTkVfSlVER0UKICAgIGNvdXQ8PCJcbiIgPDwgMS4wICogKGNsb2NrKCkgLSB0MSkgLyBDTE9DS1NfUEVSX1NFQzw8ZW5kbDsKI2VuZGlmCiAgICAKfQ==