#include <bits/stdc++.h>
using namespace std;
template <class T>
void print_vect(std::vector<T> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
void solve() {
  int n;
  cin >> n;
  vector<int> A;
  A.reserve(n);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  vector<int> up_peak;
  vector<int> down_peak;
  int status = 0;
  for (int i = 1; i < n; i++) {
    if (status == 0) {
      if (A[i] < A[i - 1]) {
        up_peak.push_back(i - 1);
        status = -1;
      } else if (A[i] > A[i - 1]) {
        down_peak.push_back(i - 1);
        status = 1;
      }
    } else if (status == 1) {
      if (A[i] < A[i - 1]) {
        status = -1;
        up_peak.push_back(i - 1);
      }
    } else {
      if (A[i] > A[i - 1]) {
        status = 1;
        down_peak.push_back(i - 1);
      }
    }
  }
  if (down_peak.size() == 0) {
    cout << "1000\n";
    return;
  }
  if (up_peak.size() == 0) {
    int money = 1000;
    int stock = money / A[down_peak[0]];
    money = money - stock * A[down_peak[0]];
    money = money + stock * A[A.size() - 1];
    cout << money << "\n";
    return;
  }
  int money = 1000;
  int stock = 0;
  int i = 0, j = 0;
  if (up_peak[0] < down_peak[0]) {
    j = 1;
  }
  for (i = 0; i < down_peak.size() && j < up_peak.size(); i++) {
    stock = money / A[down_peak[i]];
    money = money - stock * A[down_peak[i]];
    money = money + stock * A[up_peak[j]];
    j++;
  }
  if (i < down_peak.size()) {
    stock = money / A[down_peak[i]];
    money = money - stock * A[down_peak[i]];
    money = money + stock * A[A.size() - 1];
  }
  cout << money << "\n";
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  solve();
  return 0;
}
