#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool mini(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
bool maxi(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const int N = 5e5 + 5;
const int oo = 1e9;
long long sum[N];
int lef[N];
int a[N];
int c, n;
bool fail[N];
void solve() {
  cin >> c >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1, greater<int>());
  lef[0] = c;
  for (int i = 1; i <= n; i++) {
    lef[i] = lef[i - 1];
    if (lef[i] >= a[i]) lef[i] -= a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  fail[0] = true;
  for (int i = 1, j = n; i <= c; i++) {
    while (j > 1 && a[j - 1] <= i) j--;
    int lo = j;
    int hi = n + 1;
    while (hi - lo > 1) {
      int mid = (lo + hi) >> 1;
      if (sum[mid] - sum[j - 1] <= i)
        lo = mid;
      else
        hi = mid;
    }
    fail[i] = fail[i - (sum[lo] - sum[j - 1])] &&
              (lo < n || i - (sum[lo] - sum[j - 1]) == 0);
  }
  int ans = -1;
  int i = 1;
  while (c--) {
    while (i <= n && a[i] > c) i++;
    if (lef[i - 1] == 0) break;
    int s = lef[i - 1] - c;
    if (s < 0) continue;
    int lo = i - 1;
    int hi = n + 1;
    while (hi - lo > 1) {
      int mid = (lo + hi) >> 1;
      if (sum[mid] - sum[i - 1] <= s)
        lo = mid;
      else
        hi = mid;
    }
    if (!fail[s - (sum[lo] - sum[i - 1])] ||
        (lo == n && s > sum[n] - sum[i - 1]))
      ans = c;
  }
  if (ans == -1) return (void)(cout << "Greed is good");
  cout << ans << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
