#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using Graph = vector<vector<int>>;
using Edge = map<pair<int, int>, int>;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  cout << fixed << setprecision(15);
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)(N); ++i) {
    cin >> A[i];
  }
  long long money = 1000;
  long long updown = 0;
  long long mink;
  long long maxk;
  if (A[1] > A[0]) {
    updown = 1;
    mink = A[0];
    if (N == 2) {
      money = money % A[0] + (money / A[0]) * A[1];
    }
  } else {
    updown = -1;
    maxk = A[0];
  }
  for (long long i = 2; i < N; i++) {
    if (updown == 1) {
      if (A[i] >= A[i - 1]) {
        maxk = A[i];
        updown = 1;
        if (i == N - 1) {
          money = money % mink + (money / mink) * A[i];
        }
      } else {
        money = money % mink + (money / mink) * A[i - 1];
        updown = -1;
      }
    } else {
      if (A[i] <= A[i - 1]) {
        mink = A[i];
        updown = -1;
      } else {
        updown = 1;
        if (i == N - 1) {
          money = money % mink + (money / mink) * A[i];
        }
      }
    }
  }
  cout << money << endl;
  return 0;
}
