#include <bits/stdc++.h>
using namespace std;
int dp[300000], a[300000], c, n, b[300000];
set<int> s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> c;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    dp[a[i]] = 1;
    b[a[i]]++;
    s.insert(a[i]);
  }
  sort(a, a + n);
  int C = c;
  c -= a[n - 1];
  int p = 0;
  int ans = 1e6;
  for (int i = 1; i <= c; i++) {
    set<int>::const_iterator it = s.upper_bound(i);
    if (*it == *(s.begin()) && it != s.end()) continue;
    it--;
    int x = i;
    int k = *it;
    while (it != s.begin()) {
      if (x <= k * b[k]) break;
      x -= k * b[k];
      it--;
      k = *it;
      if (x <= k * b[k]) break;
    }
    if (x > k * b[k])
      dp[i] = 0;
    else if (x == k * b[k])
      dp[i] = 1;
    else {
      x %= k;
      if (dp[i] == 0) dp[i] = dp[x];
      if (x == 0) dp[i] = 1;
    }
  }
  for (int i = 1; i <= c; i++)
    if (dp[i] == 0) ans = min(ans, C - i);
  if (ans == 1e6)
    cout << "Greed is good";
  else {
    int p = n - 1;
    int u = C;
    for (int i = u; i >= 0; i--) {
      while (a[p] > i) {
        if (C >= a[p]) C -= a[p];
        p--;
      }
      if (dp[C - i] == 0 && C - i > 0) {
        ans = i;
      }
    }
    cout << ans << endl;
  }
}
