#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const double EPS = (long double)1e-7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, c, x;
  cin >> c >> n;
  map<int, int> v;
  for (int i = (0); i < (int)(n); ++i) cin >> x, ++v[x];
  for (int k = (1); k < (int)(c - 1); ++k) {
    ++v[k];
    x = c;
    vector<pair<int, int> > p;
    while (x) {
      auto t = v.upper_bound(x);
      if (t == v.begin()) {
        cout << k << endl;
        return 0;
      }
      long long int a, b;
      tie(a, b) = *(--t);
      x -= a * min(b, x / a);
      p.push_back(*t);
      v.erase(t);
    }
    for (auto a : p) v[a.first] = a.second;
    if (--v[k] == 0) v.erase(k);
  }
  cout << "Greed is good" << endl;
  return 0;
}
