#include <bits/stdc++.h>
using namespace std;
vector<int> f, nxt;
bool finish(int price, int nw) {
  int prev = price;
  f[nw]++;
  while (price) {
    int coin = nxt[min(prev, price)];
    if (nw > coin && min(prev, price) >= nw) {
      coin = nw;
    }
    if (coin == -1) break;
    price -= min(f[coin], price / coin) * coin;
    prev = coin - 1;
  }
  f[nw]--;
  return price == 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int c, n;
  cin >> c >> n;
  f.resize(c + 1, 0);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    f[a]++;
  }
  nxt.resize(c + 1, -1);
  for (int i = 1; i <= c; i++) {
    if (f[i])
      nxt[i] = i;
    else
      nxt[i] = nxt[i - 1];
  }
  for (int i = 1; i <= c; i++) {
    if (!finish(c, i)) {
      cout << i << "\n";
      return 0;
    }
  }
  cout << "Greed is good\n";
  return 0;
}
