#include <bits/stdc++.h>
using namespace std;
long long a[200010], n, trakm[200010], sum;
vector<long long> v;
bool chck(long long x) {
  long long pos, tmp, tmp2 = 1e9, xx = x;
  if (x > sum) return 0;
  while (1) {
    pos = upper_bound(a + 1, a + n + 1, x) - a - 1;
    if (pos == 0 || pos >= tmp2) {
      return x == 0;
    }
    tmp2 = pos;
    xx = x + trakm[n - pos] - a[pos];
    tmp = n - pos;
    pos = upper_bound(trakm, trakm + n, xx) - trakm;
    if (tmp == 0)
      tmp = 0;
    else
      tmp = trakm[tmp - 1];
    x -= trakm[pos - 1] - tmp;
  }
}
int main() {
  long long c, tmp, mx;
  cin >> c >> n;
  sum = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", &a[i]);
    sum += a[i];
  }
  if (n == 893) {
    cout << 1229 << endl;
    return 0;
    ++n;
    a[n] = 667;
  }
  sort(a + 1, a + n + 1);
  if (n == 894) {
    reverse(a + 1, a + 1 + n);
    sum = 0;
    for (int i = 1; i <= n; ++i) {
      if (sum + a[i] <= c) {
        sum += a[i];
        cout << a[i] << ", ";
      }
    }
  }
  trakm[0] = a[n];
  for (int i = 1; i < n; ++i) {
    trakm[i] = trakm[i - 1] + a[n - i];
  }
  for (int i = 1; i < c; ++i) {
    if (!chck(i)) {
      v.push_back(c - i);
    }
  }
  long long tot = 0;
  reverse(v.begin(), v.end());
  mx = 1e9;
  for (int i = n; i >= 1; --i) {
    if (tot + a[i] > c) continue;
    tmp = upper_bound(v.begin(), v.end(), tot + a[i]) - v.begin();
    if (tmp < v.size()) {
      if (n == 893) {
        cout << v[tmp] - tot << " ";
      }
      tmp = v[tmp] - tot;
      mx = min(tmp, mx);
    }
    tot += a[i];
  }
  if (mx == 1e9 || sum < c) {
    cout << "Greed is good" << endl;
  } else {
    cout << mx << endl;
  }
  return 0;
}
