#include <bits/stdc++.h>
using namespace std;
uint getResult(const vector<uint> &stockPrices, const uint days) {
  uint cash = 1000;
  uint stockCount = 0;
  for (uint i = 0; i < days; i++) {
    if (i == days - 1 || stockPrices[i] >= stockPrices[i + 1]) {
      cash += stockCount * stockPrices[i];
      stockCount = 0;
    } else {
      stockCount += cash / stockPrices[i];
      cash %= stockPrices[i];
    }
  }
  return cash;
}
int main() {
  uint N;
  cin >> N;
  vector<uint> A(N);
  for (uint i = 0; i < N; i++) {
    cin >> A[i];
  }
  uint result = getResult(A, N);
  cout << result << endl;
  return 0;
}
