#include<bits/stdc++.h>
#define re register
#define int long long
inline int read(){
	re int t=0;re char v=getchar();
	while(v<'0')v=getchar();
	while(v>='0')t=(t<<3)+(t<<1)+v-48,v=getchar();
	return t;
}
int a[200002],b,c,n,ans=1000;
int main(){
	n=read();
	for(re int i=1;i<=n;++i)a[i]=read();
	for(re int i=2;i<=n;++i)if(a[i]>a[i-1])ans=ans%a[i-1]+ans/a[i-1]*a[i];
	printf("%lld",ans);
}