#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  int yen = 1000;
  int nkabu = 0;
  for (int i = 0; i + 1 < n; ++i) {
    int price = A.at(i);
    if (nkabu == 0) {
      if (A.at(i) > A.at(i + 1)) {
        continue;
      }
      nkabu = yen / price;
      yen -= price * nkabu;
    } else {
      if (A.at(i) < A.at(i + 1)) {
        continue;
      }
      yen += price * nkabu;
      nkabu = 0;
    }
  }
  if (nkabu > 0) {
    int price = A.back();
    yen += nkabu * price;
  }
  cout << yen << endl;
  return 0;
}
