#include <bits/stdc++.h>
using namespace std;
int C, N;
int occ[200005];
vector<pair<int, int> > A;
int idx[200005];
bool check(int i) {
  int cur = C;
  int ind = min((int)A.size(), idx[cur]);
  bool used = false;
  while (ind > 0) {
    int val = A[ind - 1].first, cnt = A[ind - 1].second;
    if (i >= val && !used) {
      if (cur >= i) cur -= i;
      used = true;
    }
    cur -= val * min(cur / val, cnt);
    if (cur == 0) return true;
    ind = min(ind - 1, idx[cur]);
  }
  return false;
}
int main() {
  scanf("%d", &C);
  scanf("%d", &N);
  for (int i = 0, c; i < N; i++) {
    scanf("%d", &c);
    occ[c]++;
  }
  for (int i = 1; i <= C; i++)
    if (occ[i] > 0) {
      A.push_back(make_pair(i, occ[i]));
      occ[i] = A.size();
    }
  for (int i = 1; i <= C; i++) {
    if (occ[i] > 0)
      idx[i] = occ[i];
    else
      idx[i] = idx[i - 1];
  }
  for (int i = 1; i < C; i++)
    if (!check(i)) {
      printf("%d\n", i);
      return 0;
    }
  printf("Greed is good\n");
  return 0;
}
