#include <bits/stdc++.h>
using namespace std;
int findBuyT(int N, vector<int>& A, int curT) {
  int buyT = curT;
  for (int t = curT + 1; t < N; t++) {
    if (A[t] <= A[buyT]) {
      buyT = t;
    } else
      break;
  }
  return buyT;
}
int findSellT(int N, vector<int>& A, int curT) {
  if (curT == N - 1) return curT;
  int sellT = curT;
  for (int t = curT + 1; t < N; t++) {
    if (A[t] >= A[sellT]) {
      sellT = t;
    } else
      break;
  }
  return sellT;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int curT = 0;
  long long money = 1000;
  while (curT < N - 1) {
    int buyT = findBuyT(N, A, curT);
    int sellT = findSellT(N, A, buyT);
    if (sellT > buyT) {
      int numBuyStock = money / A[buyT];
      numBuyStock;
      money += (A[sellT] - A[buyT]) * numBuyStock;
    }
    curT = sellT;
  }
  cout << money << endl;
  return 0;
}
