#include<algorithm>
using namespace std;
int main()
{
	int n, a[100];
	int i, j;
	int m = 1000;

	cin >> n;
	cin >> a[0];
	for (i = 1; i < n; i++) {
		cin >> a[i];
		if (a[i] > a[i - 1]) {
			int kabu = m / a[i - 1];
			m = m - kabu * a[i - 1] + kabu * a[i];
		}
	}

	cout << m << endl;
	return 0;
}
