#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];
  vector<long long> as, ss;
  as.push_back(1000);
  ss.push_back(0);
  for (int i = 0; i < (n - 1); ++i) {
    if (v[i] == v[i + 1])
      continue;
    else if (v[i] > v[i + 1]) {
      long long t = ss.back() * v[i];
      as.push_back(as.back() + t);
      ss.push_back(0);
    } else {
      long long t = as.back() / v[i];
      as.push_back(as.back() - t * v[i]);
      ss.push_back(t);
    }
  }
  long long t = v.back() * ss.back();
  as.push_back(as.back() + t);
  ss.push_back(0);
  long long ans = *max_element(as.begin(), as.end());
  cout << ans << endl;
}
