#include <bits/stdc++.h>
using namespace std;
constexpr int kMod = 1000000007;
template <typename T>
istream& operator>>(istream& is, vector<T>& vs) {
  for (T& v : vs) is >> v;
  return is;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  cin >> A;
  int cache = 1000;
  for (int i = 0; i + 1 < N;) {
    int s = i;
    while (i + 1 < N && A[i] <= A[i + 1]) ++i;
    int e = i;
    while (i + 1 < N && A[i] >= A[i + 1]) ++i;
    int stock = cache / A[s];
    cache -= stock * A[s];
    cache += stock * A[e];
  }
  cout << cache << endl;
}
