#include <bits/stdc++.h>
using namespace std;
const int N = 200002, SQ = 450;
int n, c, a[N], first[N];
long long sum[SQ];
bool solve() {
  int x = c;
  for (int i = x; i >= 1; --i) {
    i = min(i, x);
    if (!sum[i / SQ]) {
      i = i / SQ * SQ;
      continue;
    }
    if (sum[i / SQ] <= x)
      x -= sum[i / SQ], i = i / SQ * SQ;
    else
      x -= min(first[i], x / i) * i;
    if (!x) break;
  }
  return x > 0;
}
bool check(int i) {
  ++first[i];
  sum[i / SQ] += i;
  bool fail = solve();
  --first[i];
  sum[i / SQ] -= i;
  return fail;
}
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; ++i)
    scanf("%d", &a[i]), ++first[a[i]], sum[a[i] / SQ] += a[i];
  for (int i = 1; i <= c; ++i)
    if (check(i)) return cout << i, 0;
  cout << "Greed is good";
}
