#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];
	
	long long now=1000;
	for (int i=1; i<n;++i) {
		if (a[i] < a[i+1]) {
			long long c=now/a[i];
			now += c*(a[i+1]-a[i]);
		}
	}
	cout << now << endl;
}