#import<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long LL;
LL i,j,k,l,m,n,p,s=1000,a[105];
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n;
	for(;i++<n;)cin>>a[i];
	for(i=0;++i<n;)
	{
		if(a[i]<a[i+1])s+=s/a[i]*(a[i+1]-a[i]);
	}
	cout<<s;
}