#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n, a[maxn], c[maxn], v[maxn], s, cur;
int main() {
  scanf("%d%d", &s, &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), c[a[i]]++;
  for (int i = 1; i <= 200000; i++)
    if (c[i])
      v[i] = i;
    else
      v[i] = v[i - 1];
  for (int i = 1; i <= s; i++) {
    cur = s;
    int u, k, z = 200000;
    bool ok = 1;
    while (cur > 0 && z > 0) {
      z = min(z, cur);
      z = v[z];
      if (z == 0) break;
      if (ok && i >= z && cur >= i) {
        ok = 0;
        cur -= i;
      } else {
        k = min(c[z], cur / z);
        cur -= k * z;
        z--;
      }
    }
    if (cur > 0) {
      cout << i;
      return 0;
    }
  }
  cout << "Greed is good";
}
