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

int main() {
	int n; cin >> n;
	int a[n];
	for (int i=1; i<=n; ++i) cin >> a[i];
	
	int p = 0, i = 0;
	int m = 1000;
	
	for (int i=1; i<=n;++i)
		if (a[i]<a[i+1]) {
			ll c=m/a[i];
			m+=c*(a[i+1]-a[i]);
		}
	cout << m << endl;
}