#include <bits/stdc++.h>
using namespace std;
int cnt[200005];
int hc[200005];
int a[200005];
int b[200005];
int h[200005];
int n, c;
bool check(int v) {
  int i, m = c, nx, la = 1e9;
  while (m) {
    if (b[m] >= la)
      nx = b[la - 1];
    else
      nx = b[m];
    if (v <= m && v > nx) {
      m -= v;
      v = 1e9;
    } else {
      if (nx == 0) return 0;
      m -= min(m / nx, cnt[nx]) * nx;
      la = nx;
    }
  }
  return 1;
}
void work() {
  int i, j;
  for (i = j = 1; i <= c; ++i) {
    while (j < n && a[j + 1] <= i) ++j;
    if (a[j] <= i) b[i] = a[j];
  }
  for (i = 1; i < c; ++i)
    if (!check(i)) {
      printf("%d\n", i);
      return;
    }
  printf("Greed is good\n");
}
int main() {
  int i;
  scanf("%d%d", &c, &n);
  for (i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    ++cnt[a[i]];
  }
  sort(a + 1, a + n + 1);
  work();
  fclose(stdin);
  fclose(stdout);
  return 0;
}
