#include <bits/stdc++.h>
using namespace std;
using namespace std;
int c, n;
int a[200011];
int pref[200011];
bool ok(int m, int p) {
  if (p == -1) return 0;
  int ind;
  if (m < a[p]) {
    if (a[0] > m) return 0;
    ind = upper_bound(a, a + p + 1, m) - a - 1;
  } else {
    ind = p;
  }
  m -= a[ind];
  if (m != 0 and pref[m] >= ind - 1) return 0;
  return 1;
}
int tree[800011];
struct node {
  int l, r, id;
  node() {}
  node(int l_, int r_, int id_) {
    l = l_;
    r = r_;
    id = id_;
  }
  node left() { return node(l, (l + r) / 2, 2 * id); }
  node right() { return node((l + r) / 2 + 1, r, 2 * id + 1); }
  int query(int second, int e) {
    if (r < second or e < l) return -1;
    if (second <= l and r <= e) return tree[id];
    return max(left().query(second, e), right().query(second, e));
  }
  void build() {
    if (l == r) {
      tree[id] = pref[l];
      return;
    }
    left().build();
    right().build();
    tree[id] = max(tree[2 * id], tree[2 * id + 1]);
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> c;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int m = 1; m <= c; m++) {
    int lo = -1;
    int hi = n;
    int mid;
    while (hi - lo > 1) {
      mid = (hi + lo) / 2;
      if (ok(m, mid))
        hi = mid;
      else
        lo = mid;
    }
    pref[m] = lo;
  }
  node stree(1, c, 1);
  stree.build();
  int ans = INT_MAX;
  int cur = c;
  int p = n - 1;
  while (cur > 0 and p >= 0) {
    int ind;
    if (cur < a[p]) {
      ind = upper_bound(a, a + p + 1, cur) - a - 1;
    } else {
      ind = p;
    }
    int r = a[ind];
    if (r == cur) break;
    int lo = 1;
    int hi = cur - r;
    int mid;
    while (hi - lo > 1) {
      mid = (hi + lo) / 2;
      if (stree.query(mid, cur - r - 1) >= ind - 1)
        lo = mid;
      else
        hi = mid;
    }
    if (stree.query(lo, cur - r - 1) >= ind - 1) {
      ans = min(ans, cur - lo);
    }
    p = ind - 1;
    cur -= r;
  }
  if (ans == INT_MAX) {
    cout << "Greed is good\n";
  } else {
    cout << ans;
  }
}
