#include <bits/stdc++.h>
using namespace std;
const int MaxPrice = 2e5 + 5, MaxN = 2e5 + 5;
int price, N;
int cntCoins[MaxN];
int whoNow[MaxPrice];
int prevNow[MaxPrice];
bool isCorrect[MaxPrice];
vector<pair<int, int> > coinsElems;
bool simulate(int coin) {
  int toGet = price;
  int ptrCoin = 0;
  bool used = false;
  int who = price + 1;
  while (toGet > 0) {
    who = min(prevNow[who], whoNow[toGet]);
    if (who == -1) {
      return true;
    }
    if (who <= coin && !used) {
      if (toGet < coin) {
        return false;
      }
      toGet -= coin;
      used = true;
    }
    int numFit = min(cntCoins[who], toGet / who);
    toGet -= who * numFit;
  }
  return toGet > 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(12);
  cerr << fixed << setprecision(6);
  cin >> price >> N;
  for (int i = 0; i < N; i++) {
    int v;
    cin >> v;
    cntCoins[v]++;
  }
  whoNow[0] = prevNow[0] = -1;
  for (int i = 1; i <= price + 1; i++) {
    if (cntCoins[i]) {
      whoNow[i] = i;
      prevNow[i] = whoNow[i - 1];
    } else {
      whoNow[i] = whoNow[i - 1];
      prevNow[i] = prevNow[i - 1];
    }
  }
  prevNow[price + 1] = whoNow[price];
  for (int add = 1; add <= price; add++) {
    if (simulate(add)) {
      cout << add << "\n";
      return 0;
    }
  }
  cout << "Greed is good\n";
}
