#include <iostream>
using namespace std;

int main() {
	int n, a, b;
	long long ans = 1000;
	cin >> n >> a;
	while (n-- > 1) {
		cin >> b;
		if (b > a) ans += (ans / a) * (b - a);
		a = b;
	}
	cout << ans;
	return 0;
}