#include <bits/stdc++.h>
using namespace std;
const int maxn = 2E5 + 20;
const int N = 200000;
int n, g, cnt, c[maxn], f[maxn], nex[maxn];
void Dec(int &x, int y, int z) { x -= min(z, x / y) * y; }
bool Judge(int now) {
  int res = g, k = N + 1;
  bool flag = 0;
  while (res) {
    k = min(f[res], nex[k]);
    if (!k) return 1;
    if (k <= now && !flag) Dec(res, now, 1), flag = 1;
    Dec(res, k, c[k]);
    if (!res) return 0;
  }
}
int main() {
  cin >> g >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    ++c[x];
  }
  int last = 0;
  for (int i = 1; i <= N; i++) {
    if (c[i]) last = i;
    f[i] = last;
    nex[i] = c[i - 1] ? i - 1 : nex[i - 1];
  }
  nex[N + 1] = N;
  for (int i = 1; i <= N; i++)
    if (Judge(i)) {
      cout << i;
      return 0;
    }
  puts("Greed is good");
  return 0;
}
