#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)

int main() {
	int N;
	cin >> N;
	vector<int> v(N);
	rep(i, N) {
		cin >> v.at(i);
	}

	int a=0, b=1000, c=0, x, y, z;
	rep(i, N) {
		if (i == N-1) {
			b = b + a*v.at(i);
			a = 0;
		} else if (v.at(i+1) > v.at(i)) {
			a = b/v.at(i);
			b = b%v.at(i);
		} else if (v.at(i+1) < v.at(i)) {
			b = b + a*v.at(i);
			a = 0;
		}
	}
	std::cout << b << '\n';
}
