#include <bits/stdc++.h>
using namespace std;
using ll = long long;
namespace _buff {
const size_t buff_size = 1e5;
char buff[buff_size], *begin = buff, *end = buff;
char getc() {
  if (begin == end) {
    end = (begin = buff) + fread(buff, 1, buff_size, stdin);
  }
  return begin == end ? -1 : *begin++;
}
}  // namespace _buff
ll read() {
  using namespace _buff;
  ll ret = 0;
  bool pos = true;
  char c = getc();
  for (; (c < '0' || c > '9') && c != '-'; c = getc()) {
    assert(~c);
  }
  if (c == '-') {
    pos = false;
    c = getc();
  }
  for (; c >= '0' && c <= '9'; c = getc()) {
    ret = (ret << 3) + (ret << 1) + (c ^ 48);
  }
  return pos ? ret : -ret;
}
const size_t maxn = 2e5 + 5;
int n, c, x[maxn];
int cnt[maxn];
vector<int> vc;
bool check(int add) {
  bool flag = false;
  int cur = c;
  auto lst = vc.end();
  while (cur) {
    auto it = upper_bound(vc.begin(), lst, cur);
    if (it == vc.begin()) return true;
    int x = *--it;
    if (!flag && x < add && add < cur) {
      cur -= add;
      flag = true;
    } else {
      cur -= min(cur / x, cnt[x]) * x;
      lst = it;
    }
  }
  return false;
}
int main() {
  c = read();
  n = read();
  for (int i = 0; i < n; ++i) {
    x[i] = read();
    ++cnt[x[i]];
    vc.emplace_back(x[i]);
  }
  sort(vc.begin(), vc.end());
  vc.erase(unique(vc.begin(), vc.end()), vc.end());
  for (int i = 1; i <= c; ++i) {
    if (check(i)) {
      return printf("%d\n", i), 0;
    }
  }
  puts("Greed is good");
}
