#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-12;
static const double PI = acos(-1.0);
void solve(long long N, std::vector<long long> A) {
  long long cur = 1000;
  long long kabu = 0;
  for (int i = 0; i < (int)(N - 1); i++) {
    if (A[i] < A[i + 1]) {
      kabu = cur / A[i];
      cur -= kabu * A[i];
    }
    if (A[i] > A[i + 1]) {
      cur += kabu * A[i];
      kabu = 0;
    }
  }
  if (kabu > 0) {
    cur += kabu * A[N - 1];
  }
  cout << cur << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
