#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int tmp;
  while (b) {
    a %= b;
    tmp = a;
    a = b;
    b = tmp;
  }
  return a;
}
int a[212345];
int cnt[212345];
int main() {
  int c;
  scanf("%d", &c);
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) cnt[a[i]]++;
  set<int> S;
  for (int i = 0; i < n; i++) S.insert(a[i]);
  for (int i = 1; i <= c; i++) {
    cnt[i]++;
    S.insert(i);
    int tem = c;
    vector<int> erased;
    while (tem > 0) {
      set<int>::iterator it = S.lower_bound(tem);
      if (it != S.end() && *it == tem) {
        tem = 0;
        break;
      }
      if (it == S.begin()) break;
      it--;
      int x = *it;
      int t = tem / x;
      t = min(cnt[x], t);
      tem -= t * x;
      S.erase(S.find(x));
      erased.push_back(x);
    }
    if (tem != 0) {
      printf("%d\n", i);
      return 0;
    }
    for (int j = 0; j < erased.size(); j++) S.insert(erased[j]);
    cnt[i]--;
    if (cnt[i] == 0) S.erase(S.find(i));
  }
  printf("Greed is good\n");
}
