#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
int a[N];
int n, c, x;
set<int> S;
int main() {
  scanf("%d%d", &c, &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (++a[x] == 1) S.insert(x);
  }
  for (int i = 1; i <= c; i++) {
    if (++a[i] == 1) S.insert(i);
    int x = c, f = c;
    while (f) {
      set<int>::iterator p = S.upper_bound(f);
      if (p == S.begin()) break;
      p--;
      int y = *p;
      x -= min(a[y], x / y) * y;
      f = min(x, y - 1);
    }
    if (x) {
      printf("%d", i);
      return 0;
    }
    if (--a[i] == 0) S.erase(i);
  }
  printf("Greed is good");
}
