#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1 << 18;
int N, C;
int cnt[MAXN], prv[MAXN];
int main() {
  scanf("%d %d", &C, &N);
  for (int i = 1; i <= N; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  for (int i = 1; i <= C + 1; i++) {
    prv[i] = (cnt[i] ? i : prv[i - 1]);
    assert(prv[i] <= i);
  }
  for (int val = 0; val < C; val++) {
    cnt[val]++;
    int cur = C;
    int ncoin = C;
    while (cur) {
      int coin;
      if (prv[cur] <= val && val <= cur) {
        coin = val;
      } else {
        coin = prv[cur];
      }
      ncoin = coin = min(coin, ncoin);
      if (coin == 0) {
        break;
      }
      int ntake = min(cur / coin, cnt[coin]);
      cur -= ntake * coin;
      if (prv[ncoin - 1] <= val && val < ncoin) {
        ncoin = val;
      } else {
        ncoin = prv[ncoin - 1];
      }
    }
    if (cur) {
      printf("%d\n", val);
      return 0;
    }
    cnt[val]--;
  }
  puts("Greed is good");
}
