#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (auto &e : arr) cin >> e;
  arr.push_back(0);
  int yen = 1000;
  int stocks = 0;
  for (int t = 1; t < n + 1; t++) {
    int today = arr[t - 1];
    int tomor = arr[t];
    if (today < tomor) {
      stocks += yen / today;
      yen = yen - (stocks * today);
    } else {
      yen += today * stocks;
      stocks = 0;
    }
  }
  cout << yen;
  return 0;
}
