#include <bits/stdc++.h>
using namespace std;
void Main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long> sell(n);
  vector<vector<long>> buy(n, vector<long>(2));
  sell[0] = 1000;
  buy[0][0] = 1000 % a[0];
  buy[0][1] = 1000 / a[0];
  for (int i = 1; i < n; i++) {
    for (int k = 0; k < i; k++) {
      sell[i] = sell[i - 1];
      buy[i][0] = buy[i - 1][0];
      buy[i][1] = buy[i - 1][1];
      long tmps = buy[k][1] * a[i] + buy[k][0];
      if (sell[i] < tmps) sell[i] = tmps;
      long tmpb1 = sell[k] / a[i];
      if (buy[i][1] < tmpb1) {
        buy[i][0] = sell[k] % a[i];
        buy[i][1] = tmpb1;
      }
    }
  }
  cout << sell[n - 1] << endl;
}
int main(int argc, char **argv) {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  Main();
  return 0;
}
