#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int cnt[N];
int nx[N];
int c, n;
bool check(int v) {
  int t = c;
  int p = nx[t];
  bool flag = false;
  while (t) {
    if (!flag && v >= p && v <= t) p = v, flag = true;
    if (p == 0) break;
    t -= min(cnt[p], t / p) * p;
    p = nx[min(p - 1, t)];
  }
  return t == 0;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  for (int i = 1; i <= c; i++) {
    nx[i] = nx[i - 1];
    if (cnt[i]) nx[i] = i;
  }
  for (int i = 1; i < c; i++) {
    cnt[i]++;
    if (!check(i)) return printf("%d\n", i), 0;
    cnt[i]--;
  }
  puts("Greed is good");
  return 0;
}
