#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int> A(N);
	for (auto& x : A) {
		cin >> x;
	}

	long long x = 1000;

	for (int i = 0; i + 1 < N; ++i) {
		if (A[i] < A[i + 1]) {
			auto m = x / A[i];
			x -= m * A[i];
			x += m * A[i + 1];
		}
	}
	cout << x << endl;
}
