#include <bits/stdc++.h>
int main() {
  int n;
  std::vector<int> aList;
  std::vector<int> status;
  std::cin >> n;
  aList.resize(n);
  for (int i = 0; i < n; i++) std::cin >> aList[i];
  std::vector<int> aList_;
  aList_.push_back(aList[0]);
  for (int i = 1; i < n; i++) {
    if (aList[i] != aList[i - 1]) aList_.push_back(aList[i]);
  }
  int n_ = aList_.size();
  status.resize(n_, 0);
  if (aList_[0] < aList_[1]) status[0] = -1;
  if (aList_[n_ - 1] > aList_[n_ - 2]) status[n_ - 1] = 1;
  for (int i = 1; i < n_; i++) {
    if (aList_[i - 1] < aList_[i] && aList_[i + 1] < aList_[i]) status[i] = 1;
    if (aList_[i - 1] > aList_[i] && aList_[i + 1] > aList_[i]) status[i] = -1;
  }
  for (int i = n_ - 1; i >= 0; i--) {
    if (status[i] == 1) break;
    status[i] = 0;
  }
  long long asset = 1000;
  long long stock = 0;
  for (int i = 0; i < n_; i++) {
    if (status[i] == 1) {
      asset += stock * aList_[i];
      stock = 0;
    } else if (status[i] == -1) {
      int tmp = asset / aList_[i];
      asset -= tmp * aList_[i];
      stock += tmp;
    }
  }
  std::cout << asset << std::endl;
  return 0;
}
