#include <bits/stdc++.h>
using namespace std;
char _;
int n;
int price[80];
vector<pair<int, int> > adj;
void stockBuySell() {
  int i = 0;
  while (i < n - 1) {
    while ((i < n - 1) && (price[i + 1] <= price[i])) i++;
    if (i == n - 1) break;
    int buy = i++;
    while ((i < n) && (price[i] >= price[i - 1])) i++;
    int sell = i - 1;
    adj.push_back({buy, sell});
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  int val = 1000;
  int stock = 0;
  for (int i = 0; i < n; i++) cin >> price[i];
  stockBuySell();
  for (int i = 0; i < adj.size(); i++) {
    stock = val / price[adj[i].first];
    val = val % price[adj[i].first];
    val = val + stock * price[adj[i].second];
    stock = 0;
  }
  cout << val << "\n";
  return 0;
}
