#include <bits/stdc++.h>
 
#define fi first
#define se second
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define reset(a, v) memset((a), v, sizeof(a))
 
using namespace std;
 
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ii> vii;

const int N = 85;

int n;
int price[N];

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &price[i]);
	}
	int ans = 0;
	int curMoney = 1000;
	int curStock = 0;
	for (int i = 0; i < n; i++) {
		else if (price[i] <= price[i+1]) {
			int stockBought = curMoney / price[i];
			int pay = stockBought * price[i];
			curStock += stockBought;
			curMoney -= pay;
		}
		else {
			if (curStock > 0) {
				curMoney += curStock * price[i];
				curStock = 0;
			}
		}
	}
	printf("%d\n", curMoney);
	return 0;
}