#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main()
{
	ll n,m=1000;
	cin>>n;
	ll arr[n];
	for (int i=0; i<n; i++)
	  cin>>arr[i];
	for (int i=0; i<n-1; i++)
	{
		if (arr[i]>arr[i+1])
		  continue;
	    else
	    {
	    	s=m/arr[i];
			m=m%arr[i];
			m=m+s*arr[i+1];
		}
	}
	cout<<m<<endl;
	return 0;
}