#include <bits/stdc++.h>
using namespace std;
int c, n, x, f[200005], a[200005];
bool check(int i) {
  int ans = 0;
  int y = c;
  bool used = false;
  while (a[y]) {
    if (!used && a[y] <= i && ans + i <= c) {
      ans += i;
      if (ans == c) return false;
      y = min(y, c - ans);
      used = true;
    } else {
      ans += a[y] * min(f[a[y]], (c - ans) / a[y]);
      if (ans == c) return false;
      y = min(a[y] - 1, c - ans);
    }
  }
  return true;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = (int)(1); i <= (int)(n); ++i) {
    scanf("%d", &x);
    ++f[x];
  }
  x = 0;
  f[0] = 0;
  for (int i = (int)(1); i <= (int)(c); ++i) {
    if (f[i]) x = i;
    a[i] = x;
  }
  for (int i = (int)(1); i <= (int)(c); ++i) {
    if (check(i)) {
      printf("%d", i);
      return 0;
    }
  }
  puts("Greed is good");
  return 0;
}
