#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-9;
const long long INF = 10e17;
double equal(double a, double b) { return fabs(a - b) < DBL_EPSILON; }
std::istream &operator>>(std::istream &in, set<int> &o) {
  int a;
  in >> a;
  o.insert(a);
  return in;
}
std::istream &operator>>(std::istream &in, queue<int> &o) {
  long long a;
  in >> a;
  o.push(a);
  return in;
}
bool contain(set<int> &s, int a) { return s.find(a) != s.end(); }
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  v.erase(unique(v.begin(), v.end()), v.end());
  n = v.size();
  if (n == 1) {
    cout << 1000 << endl;
    return 0;
    ;
  }
  vector<int> yens = {1000}, stocks = {0};
  for (int i = 0; i < (n); ++i) {
    if (i == n - 1 || v[i] > v[i + 1]) {
      long long addYen = stocks.back() * v[i];
      yens.push_back(yens.back() + addYen);
      stocks.push_back(0);
    } else {
      long long addStock = yens.back() / v[i];
      yens.push_back(yens.back() - v[i] * addStock);
      stocks.push_back(stocks.back() + addStock);
    }
  }
  long long ans = *max_element(yens.begin(), yens.end());
  cout << ans << endl;
}
