#include <bits/stdc++.h>
using namespace std;
int main(void) {
  unsigned long long N;
  cin >> N;
  vector<unsigned long long> A(N);
  for (unsigned long long n = 0; n < N; n++) {
    cin >> A[n];
  }
  int curMoney = 1000;
  int curStock = 0;
  for (int i = 0; i < N - 1; i++) {
    unsigned long long curVal = A[i];
    int downID = -1;
    int upID = -1;
    for (int j = i + 1; j < N; j++) {
      if (A[j] < curVal) {
        downID = j;
        break;
      }
    }
    for (int j = i + 1; j < N; j++) {
      if (A[j] > curVal) {
        upID = j;
        break;
      }
    }
    if ((upID > downID && downID != -1) || (upID == -1 && downID != -1)) {
      curMoney += curVal * curStock;
      curStock = 0;
    } else if ((upID < downID && upID != -1) || (upID != -1 && downID == -1)) {
      int buynum = curMoney / curVal;
      curStock += buynum;
      curMoney -= curVal * buynum;
    }
  }
  curMoney += A[N - 1] * curStock;
  curStock = 0;
  cout << curMoney << endl;
  return 0;
}
