#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool getmin(T *a, const T &b) {
  if (b < *a) {
    *a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool getmax(T *a, const T &b) {
  if (b > *a) {
    *a = b;
    return true;
  }
  return false;
}
template <class T>
inline void read(T *a) {
  char c;
  while (isspace(c = getchar())) {
  }
  bool flag = 0;
  if (c == '-')
    flag = 1, *a = 0;
  else
    *a = c - 48;
  while (isdigit(c = getchar())) *a = *a * 10 + c - 48;
  if (flag) *a = -*a;
}
const int mo = 1000000007;
template <class T>
T pow(T a, T b, int c = mo) {
  T res = 1;
  for (T i = 1; i <= b; i <<= 1, a = 1LL * a * a % c)
    if (b & i) res = 1LL * res * a % c;
  return res;
}
const int N = 1000000;
int a[N];
long long s[N];
bool f[N];
int l[N], r[N], pre[N];
int c, n;
int main() {
  cin >> c >> n;
  for (int i = (1); i <= (n); ++i) read(a + i);
  sort(a + 1, a + n + 1);
  for (int i = (1); i <= (n); ++i) s[i] = s[i - 1] + a[i];
  f[0] = 1;
  int j = 0;
  for (int i = (1); i <= (c); ++i) {
    while (j < n && a[j + 1] <= i) ++j;
    int l = 1, r = j, res;
    while (l <= r) {
      int m = (l + r) >> 1;
      if (s[j] - s[m - 1] <= (long long)i)
        res = m, r = m - 1;
      else
        l = m + 1;
    }
    if (res == 1 && i != s[j])
      f[i] = 0;
    else {
      if (!j)
        f[i] = 0;
      else
        f[i] = f[i - (s[j] - s[res - 1])], ::l[i] = res, ::r[i] = j,
        pre[i] = i - (s[j] - s[res - 1]);
    }
  }
  int ans = 1e9;
  j = c;
  for (int i = (c); i >= (1); --i) {
    while (j && i < a[l[j]]) j = pre[j];
    if (i > j) continue;
    int L = l[j], R = r[j], res = R + 1;
    while (L <= R) {
      int m = (L + R) >> 1;
      if (s[r[j]] - s[m - 1] <= (long long)(j - i))
        res = m, R = m - 1;
      else
        L = m + 1;
    }
    if (res > l[j] && a[res - 1] > i) continue;
    if (res == 1 && j - i != s[r[j]]) getmin(&ans, i);
    int p = j - i - (s[r[j]] - s[res - 1]);
    if (!f[p]) getmin(&ans, i);
  }
  if (ans > c)
    cout << "Greed is good" << endl;
  else
    cout << ans << endl;
  return 0;
}
