#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long LL;
const int maxn=20;
LL a[maxn];
int main()
{
int n,kase=0;
while(scanf("%d",&n)!=EOF)
{
LL p=-1;
for(int i=0;i<n;i++)
{
scanf("%lld",&a[i]);
p=max(p,a[i]);
}
for(int i=0;i<n-1;i++) //起点
{
LL sum=a[i];
for(int j=i+1;j<n;j++) //终点
{
sum*=a[j];
p=max(sum,p);
}
}
printf("Case #%d: The maximum product is ",++kase);
if(p>0) printf("%lld.\n",p);
else cout<<"0.\n";
if(kase) printf("\n");
}
return 0;
}
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long LL;
const int maxn=20;
LL a[maxn];
int main()
{
int n,kase=0;
while(scanf("%d",&n)!=EOF)
{
LL p=-1;
for(int i=0;i<n;i++)
{
scanf("%lld",&a[i]);
p=max(p,a[i]);
}
for(int i=0;i<n-1;i++) //起点
{
LL sum=a[i];
for(int j=i+1;j<n;j++) //终点
{
sum*=a[j];
p=max(sum,p);
}
}
printf("Case #%d: The maximum product is ",++kase);
if(p>0) printf("%lld.\n",p);
else cout<<"0.\n";
if(kase) printf("\n");
}
return 0;
}