#include <bits/stdc++.h>
using namespace std;
int c, n, x, f[1000000], k, kk, kkk, d;
struct lsg {
  int x, y;
} a[1000000];
int findit(int x, int y) {
  int l = 0, r = y;
  while (l < r) {
    int m = (l + r + 1) / 2;
    if (a[m].x <= x)
      l = m;
    else
      r = m - 1;
  }
  return l;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> c >> n;
  for (int i = 1; i <= n; i++) cin >> x, f[x]++;
  a[++kk].y = 1;
  for (int i = 1; i <= c; i++)
    if (f[i]) a[++kk].x = i, a[kk].y = f[i];
  for (int i = 0; i <= c; i++) {
    d = c;
    kkk = i;
    k = kk + 1;
    while (d != 0 && k != 1) {
      k = findit(d, k - 1);
      if (k == 1) break;
      if (a[k].x < kkk && d >= kkk) {
        d -= kkk;
        k++;
        kkk = 0;
        continue;
      }
      int kk = min(d / a[k].x, a[k].y);
      d -= kk * a[k].x;
    }
    if (d != 0) {
      cout << i << endl;
      return 0;
    }
  }
  cout << "Greed is good" << endl;
}
