#include<cstdio> #include<algorithm> using namespace std; //真的水,找所有团队人数的最小公倍数就好了 int gcd(int a,int b) { return !b?a:gcd(b,a%b); } int main() { int n,t,ans; bool f; while(scanf("%d",&n),n) { ans = 1; f = true; for(int i = 0;i<n;++i) { scanf("%d",&t); if(f) { ans = ans/gcd(ans,t)*t; //直接用algorithm中__gcd() //ans = ans/__gcd(ans,t)*t; if(ans>=1000000) f = false; } } if(f) printf("The CEO must bring %d pounds.\n",ans); else puts("Too much money to pay!"); } return 0; }