#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1000 * 100 + 5;
int a[N], f[N], b[N], len = 0, n, sum, pr[N], cnt[N];
vector<int> q;
int main() {
  scanf("%d %d", &sum, &n);
  int i, j, l, r, m;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    cnt[a[i]]++;
  }
  sort(a + 1, a + n + 1);
  l = 1;
  while (l <= n) {
    r = l;
    while ((r <= n) && (a[l] == a[r])) {
      r++;
    }
    q.push_back(a[l]);
    l = r;
  }
  int c = sum;
  for (i = n; i >= 1; i--) {
    if (a[i] <= c) {
      c -= a[i];
      b[++len] = a[i];
    }
  }
  pr[0] = 0;
  for (i = 1; i <= len; i++) {
    pr[i] = pr[i - 1] + b[i];
  }
  f[0] = 0;
  for (i = 1; i <= sum; i++) {
    f[i] = f[i - 1];
    if (cnt[i] != 0) {
      f[i] = i;
    }
  }
  for (i = 1; i <= sum; i++) {
    l = 0;
    r = len + 1;
    while (r - l > 1) {
      m = (r + l) / 2;
      if (b[m] >= i) {
        l = m;
      } else {
        r = m;
      }
    }
    c = sum - pr[l] - i;
    if (c < 0) {
      continue;
    }
    j = min(c, b[l + 1]);
    while (c > 0) {
      j = f[j];
      if (j == 0) {
        break;
      }
      c -= min(c / j, cnt[j]) * j;
      if (c >= j) {
        j = f[j - 1];
      } else {
        j = f[c];
      }
      if (j <= 0) {
        break;
      }
    }
    if (c != 0) {
      break;
    }
  }
  if (i == sum + 1) {
    puts("Greed is good");
  } else {
    printf("%d", i);
  }
  return 0;
}
