#include <bits/stdc++.h>
using namespace std;
int cnt[200001], pre[200001];
int main() {
  int c, n;
  scanf("%d%d", &c, &n);
  int num;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num);
    cnt[num]++;
  }
  for (int i = 1; i <= c; i++) {
    if (cnt[i])
      pre[i] = i;
    else
      pre[i] = pre[i - 1];
  }
  int ans;
  for (ans = 1; ans < c; ans++) {
    int res = c, used = 0, now = pre[c];
    while (now) {
      if (!used && now <= ans && ans <= res) {
        used = 1;
        res = res - ans;
        now = pre[res];
      } else {
        int nowcnt = min(cnt[now], res / now);
        res = res - nowcnt * now;
        now = min(pre[now - 1], pre[res]);
      }
    }
    if (res) {
      printf("%d\n", ans);
      break;
    }
  }
  if (ans == c) printf("Greed is good\n");
  return 0;
}
