#include <bits/stdc++.h>
using namespace std;
static uint32_t pset[6300] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  int c, n;
  cin >> c >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  a.push_back(c);
  sort(a.begin(), a.end());
  vector<int> b(n + 1);
  for (int i = n - 1; i >= 0; --i) {
    if (b[i + 1] + a[i] <= c) {
      b[i] = b[i + 1] + a[i];
    } else {
      b[i] = b[i + 1];
    }
  }
  if (b[0] != c) {
    cout << 0 << endl;
    return 0;
  }
  const int bit_limit = c / 32 + 1;
  pset[0] = 1u;
  int answer = c;
  for (int i = 0; answer == c && i < n; ++i) {
    const int shift_hi = a[i] >> 5;
    const int shift_lo = a[i] & 31;
    if (shift_lo == 0) {
      for (int j = bit_limit - 1; j >= shift_hi; --j) {
        pset[j] = pset[j - shift_hi];
      }
    } else {
      for (int j = bit_limit - 1; j > shift_hi; --j) {
        const int k = j - shift_hi;
        pset[j] = (pset[k - 1] >> (32 - shift_lo)) | (pset[k] << shift_lo);
      }
      pset[shift_hi] =
          (pset[shift_hi] & ((1u << shift_lo) - 1u)) | (pset[0] << shift_lo);
    }
    for (int j = a[i]; answer == c && j < a[i + 1]; ++j) {
      const int x = c - b[i + 1];
      if (x < j) {
        continue;
      }
      const int y = x - j;
      if ((pset[y >> 5] & (1u << (y & 31))) == 0u) {
        answer = j;
      }
    }
  }
  if (answer == c) {
    cout << "Greed is good" << endl;
  } else {
    cout << answer << endl;
  }
  return 0;
}
