#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
istream& operator>>(istream& s, vector<T>& v) {
  for (T& x : v) {
    s >> x;
  }
  return s;
}
template <class F, class S>
istream& operator>>(istream& s, pair<F, S>& p) {
  s >> p.first >> p.second;
  return s;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  cin >> A;
  A.erase(unique(A.begin(), A.end()), A.end());
  N = A.size();
  int cash = 1000;
  int mi = INT_MAX, ma = 0;
  for (int i = 0; i < (N); i++) {
    if (A[i] < mi) {
      mi = A[i];
    } else if (A[i] > ma) {
      ma = A[i];
    }
    if (i == N - 1 || A[i + 1] < A[i]) {
      if (mi < ma) {
        if (cash > mi) {
          int s = cash / mi;
          cash += (ma - mi) * s;
        }
        mi = INT_MAX;
        ma = 0;
      }
    }
  }
  cout << cash << endl;
}
