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

int main() {
	int N;
	cin >> N;
	vector<long long> A(N);
	for (int i = 0; i < N; i++) cin >> A[i];
	long long NOW = 1000;
	for (int i = 0; i < N - 1; i++) {
		if (A[i] < A[i + 1]) {
			NOW = NOW % A[i] + (NOW / A[i]) * A[i + 1];
		}
	}
	cout << NOW << endl;
}