#include <bits/stdc++.h>
using namespace std;
#pragma(comment, "\STACK:1024000000,1024000000")
int pre[500020], n, c, a[500020], cnt[500020], x, m;
bool check(int x) {
  if (x == 0) x = 0x3f3f3f3f;
  int ret = c;
  int r = m;
  while (1) {
    int tt = ret, t = upper_bound(a + 1, a + r + 1, ret) - a - 1;
    if ((t <= 0 || x > a[t]) && ret >= x) {
      ret -= x;
      x = 0x3f3f3f3f;
      continue;
    } else if (t > 0) {
      ret -= a[t] * min(ret / a[t], cnt[a[t]]);
    } else
      break;
    if (ret == tt) break;
    r = t - 1;
  }
  return ret != 0;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    cnt[a[i]]++;
  }
  a[n + 1] = 0x3f3f3f3f;
  sort(a + 1, a + 1 + n);
  m = unique(a + 1, a + 1 + n) - a - 1;
  for (int i = 1; i <= c; ++i) {
    int j = upper_bound(a + 1, a + 1 + m, i) - a - 1;
    pre[i] = a[j];
  }
  int ans = -1;
  for (x = 0; x <= c; ++x) {
    if (check(x)) {
      ans = x;
      break;
    }
  }
  if (ans == -1)
    puts("Greed is good");
  else
    cout << ans << endl;
  return 0;
}
