#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) {
    cin >> A[i];
  }
  int nvalue = 1000;
  for (int i = 0; i < (N); ++i) {
    int buy = A[i];
    int sell = buy;
    int sellindex = -1;
    for (size_t j = i + 1; j < N; j++) {
      if (A[j] < A[j - 1]) break;
      if (A[j] > A[j - 1]) {
        chmax(sell, A[j]);
        sellindex = j;
      }
    }
    if (buy == sell) continue;
    i = sellindex;
    int buycount = nvalue / buy;
    nvalue -= buy * buycount;
    nvalue += sell * buycount;
  }
  cout << nvalue << endl;
}
