#include <bits/stdc++.h>
using namespace std;
const int MAX = 200010, INF = 1e9;
int cnt[MAX];
int n, c, ans = INF;
int mx[MAX], v[MAX];
bool f[MAX];
vector<int> a;
bool ok(int x, int y) {
  if (x == 0) return 1;
  if (y == 0) return 0;
  x -= a[y] * min(cnt[a[y]], x / a[y]);
  if (mx[x] > y - 1)
    return ok(x, y - 1);
  else
    return f[x];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> c >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  a.push_back(0);
  for (int i = 1; i <= c; i++)
    if (cnt[i]) a.push_back(i);
  a.push_back(c);
  int cur = c;
  for (int i = a.size() - 1; i >= 1; i--)
    cur -= a[i] * min(cnt[a[i]], cur / a[i]), v[i] = cur;
  memset(mx, -1, sizeof mx);
  for (int i = 0; i < a.size() - 1; i++) {
    for (int j = a[i]; j < a[i + 1]; j++) {
      mx[j] = i;
      f[j] = ok(j, i);
    }
  }
  for (int i = 0; i < a.size() - 1; i++) {
    for (int j = a[i]; j < a[i + 1]; j++) {
      if (v[i + 1] >= j && !ok(v[i + 1] - j, i)) ans = min(ans, j);
    }
  }
  if (ans != INF)
    cout << ans << endl;
  else
    cout << "Greed is good" << endl;
}
