#include <bits/stdc++.h>
using namespace std;
const int N = 201110;
int n, m;
int cnt[N], pre[N];
bool Che(int u) {
  int k = n - u, x = u;
  while (k > 0 && u != 0) {
    k -= min(k / u, cnt[u]) * u;
    u = pre[min(k, u - 1)];
  }
  return (k != 0);
}
int main() {
  scanf("%d%d", &n, &m);
  int u, res = 0;
  while (m--) {
    scanf("%d", &u);
    cnt[u]++;
  }
  pre[0] = 0;
  for (int i = 1; i <= n; i++)
    if (cnt[i])
      pre[i] = i;
    else
      pre[i] = pre[i - 1];
  for (int i = n; i > 0; i--) {
    if (i <= n)
      if (Che(i)) res = i;
    n -= min(cnt[i], n / i) * i;
  }
  if (res == 0)
    cout << "Greed is good";
  else
    cout << res << endl;
}
