#include <bits/stdc++.h>
using namespace std;
int c, n, data[233333], pre[233333];
int cnew;
int verify() {
  int tc = c, flg = 0;
  for (int i = pre[tc]; i; i = pre[min(tc, i - 1)]) {
    if (i <= cnew && tc >= cnew && !flg) {
      tc -= cnew;
      flg = 1;
    }
    tc -= i * min(tc / i, data[i]);
  }
  return tc == 0;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    ++data[x];
  }
  for (int i = 1; i <= c; ++i) pre[i] = data[i] ? i : pre[i - 1];
  for (cnew = 1; cnew <= c; ++cnew)
    if (!verify()) break;
  if (cnew > c)
    puts("Greed is good");
  else
    printf("%d\n", cnew);
  return 0;
}
