#include<iostream>
#include<vector>
using namespace std;

int main(void) {
	int n;
	cin >> n;
	__int64 kab = 0;
	__int64 m(1000);
	int b;
	vector<int> a;
	for (int i = 0; i < n; i++) {
		cin >> b;
		a.push_back(b);
	}
	__int64 memo = 1000;
	for (int i = 0; i < n-1; i++) {
		if (a[i] < a[i + 1]) {
			memo = m + kab * a[i];
			memo = memo / a[i];
			if (memo > kab) {
				m = m + kab * a[i];
				kab = m / a[i];
				m = m % a[i];
			}
		}
		else {
			m += kab * a[i];
			kab = 0;
		}
	}
	m += kab * a[n - 1];
	cout << m;

	return 0;
}