#include <bits/stdc++.h>
using namespace ::std;
int ar[200005], cnt[200005], pre[200005], n, c;
vector<pair<int, int>> v;
int brute(int t, int res) {
  bool is = 1;
  for (int cur = pre[t]; cur;)
    if (t >= res && res >= cur && is)
      t -= res, cur = pre[t], is = 0;
    else if (!cnt[cur])
      cur = pre[cur - 1];
    else {
      int g = min(t / cur, cnt[cur]);
      v.push_back({cur, g});
      t -= g * cur;
      cnt[cur] -= g;
      cur = pre[t];
    }
  return t;
}
bool check(int i) {
  int t = brute(c, i);
  for (auto a : v) cnt[a.first] += a.second;
  v.clear();
  return !!t;
}
int main() {
  cin >> c >> n;
  for (int i = 0, t; i < n; i++) cin >> t, ar[i] = t, cnt[t]++;
  for (int i = 1; i <= c; i++) pre[i] = (cnt[i] ? i : pre[i - 1]);
  for (int i = 1; i < c; i++)
    if (check(i)) {
      cout << i << '\n';
      return 0;
    }
  cout << "Greed is good\n";
}
