#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 5;
int n, m, mx[N], cnt[N];
int main() {
  scanf("%d%d", &m, &n);
  for (int i = 1, x; i <= n; ++i) scanf("%d", &x), mx[x] = x, ++cnt[x];
  for (int i = 1; i <= m; ++i) mx[i] = max(mx[i - 1], mx[i]);
  for (int i = 1; i <= m; ++i) {
    int val = m, pt = m;
    bool ok = false, used = false;
    while (1) {
      if (!val || !mx[pt]) {
        ok = val > 0;
        break;
      }
      if (!used) {
        if (mx[pt] == i) {
          int tmp = min(val / i, cnt[i] + 1);
          if (!tmp) {
            ok = true;
            break;
          }
          val -= tmp * i, used = true;
          if (tmp == cnt[i] + 1)
            pt = min(val, i - 1);
          else
            pt = val;
        } else if (mx[pt] < i) {
          val -= i, used = true;
          if (val >= i)
            pt = i - 1;
          else
            pt = val;
        } else {
          int tmp = min(val / mx[pt], cnt[mx[pt]]);
          if (!tmp) {
            ok = true;
            break;
          }
          val -= tmp * mx[pt];
          if (tmp == cnt[mx[pt]])
            pt = min(val, mx[pt] - 1);
          else
            pt = val;
        }
      } else {
        int tmp = min(val / mx[pt], cnt[mx[pt]]);
        if (!tmp) {
          ok = true;
          break;
        }
        val -= tmp * mx[pt];
        if (tmp == cnt[mx[pt]])
          pt = min(val, mx[pt] - 1);
        else
          pt = val;
      }
    }
    if (ok) return printf("%d", i), 0;
  }
  return puts("Greed is good"), 0;
}
