#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=80;
int a[N];
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&a[i]);
	ll yen=1000;
	for(int i=1;i<=n;i++)
	{
		int st=i;
		while(i+1<=n&&a[i+1]>=a[i])i++;
		ll num=yen/a[st];
		yen=yen+num*(a[i]-a[st]);
	}
	printf("%lld\n",yen);
	return 0;
}
