#include <bits/stdc++.h>
using namespace std;
const int OO = (int)2e9;
const int MOD = (int)1e9 + 7;
const long double Pi = 3.1415926535897932384626433832795;
const int N = (int)3e5 + 5;
const int DEBUG = 0;
int cnt[N], mx[N], x, n, c, res = OO;
bool check(int s, int i) {
  if (s == 100 - 62) {
    n++;
    n--;
  }
  i = min(s, i);
  while (i > 0 && mx[i] > 0) {
    s -= min(cnt[mx[i]], s / mx[i]) * mx[i];
    i = mx[i] - 1;
    i = min(s, i);
  }
  if (s == 0)
    return false;
  else
    return true;
}
int main() {
  cin >> c >> n;
  for (int i = (int)(1); i <= (int)(n); i++) {
    scanf("%i", &x);
    cnt[x]++;
  }
  for (int i = (int)(1); i <= (int)(c); i++)
    if (cnt[i])
      mx[i] = i;
    else
      mx[i] = mx[i - 1];
  for (int i = (int)(c); i >= (int)(1); i--) {
    if (i == 2) {
      n++;
      n--;
    }
    if (c > i && check(c - i, i)) res = i;
    c -= min(cnt[i], c / i) * i;
  }
  if (res == OO)
    cout << "Greed is good";
  else
    cout << res;
}
