#include <bits/stdc++.h>
using namespace std;
static const int MAX = 10000;
static const long long INFTY = 1e12;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long MRINF = 5000000000000000;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0, i_len = (N); i < i_len; ++i) cin >> A[i];
  long long money = 1000;
  long long tani = A[0];
  long long yama = A[0];
  long long downflag = 0;
  long long upflag = 1;
  long long kabu = 0;
  for (int i = 1; i < N; i++) {
    if (A[i - 1] < A[i]) {
      if (upflag == 1) {
        kabu = money / A[i - 1];
        money = money % A[i - 1];
      }
      downflag = 1;
      upflag = 0;
    } else if (A[i - 1] > A[i]) {
      if (downflag == 1) {
        money += kabu * A[i - 1];
        kabu = 0;
      }
      downflag = 0;
      upflag = 1;
    }
  }
  if (A[N - 1] > A[N - 2]) {
    money += kabu * A[N - 1];
  }
  cout << money << endl;
}
