//* Problem  : H: Two Ends
//* Contest  : ECNA-2006
//* Type     : Solution
//* Date     : 2008.08.04
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <queue>
#include <string>
#include <stack>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

typedef pair <int,int> PIII;
typedef vector <int> VI;
typedef vector <vector<int> > VVI;
typedef vector <pair<int,int> > VPII;
typedef vector <vector<pair<int,int> > > VVPII;

#define int64 long long
#define PI (2.0 * acos(0.0))
#define MP make_pair
#define PB push_back
#define SZ(a) (int)a.size()
#define FOR(i, n) for (int i = 0; i < (int)n; i++)
#define FORSZ(i, a) FOR(i, SZ(a))
#define FORE(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)
#define FORR(i, a, b) for (int i = (int)(a); i >= int(b); i--)
#define INF 1000000000
#define INFL 1000000000000000000LL
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()

inline int si(){int tt; scanf("%d", &tt); return tt;}

int n, res;

int a[1024], sum;

int play_opt(int l, int r);

int dp1[1024][1024], dp2[1024][1024];

int play_greedy(int l, int r)
{
	if (dp2[l][r]) return dp2[l][r];
	if (l == r) return 0;
	if (a[r] > a[l])
		return dp2[l][r] = play_opt(l, r - 1);
	else
		return dp2[l][r] = play_opt(l + 1, r);
}

int play_opt(int l, int r)
{
	if (dp1[l][r]) return dp1[l][r] - 1;
	if (l == r) return a[l];
	int resl = a[l] + play_greedy(l + 1, r);
	int resr = a[r] + play_greedy(l, r - 1);
	int res = max(resl, resr);
	dp1[l][r] = res + 1;
	return res;
}

void solve()
{
	memset(dp1, 0, sizeof(dp1));
	memset(dp2, 0, sizeof(dp2));
	int res_first = play_opt(0, n - 1);	
	int res_second = sum - res_first;
	res = res_first - res_second;
	res = max(res, 0);
}

int main()
{
#ifdef _DEBUG
	freopen("1064", "r", stdin);
//	freopen("1064w", "w", stdout);
#endif
	int it = 0;
	while (scanf("%d", &n) && n)
	{
		sum = 0;
		FOR(i,n)
		{
			scanf("%d", a + i); sum += a[i];
		}
		solve();
		printf("In game %d, the greedy strategy might lose by as many as %d points.\n", ++it, res);
	}
	return 0;
}

