#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;
  int stock = 0;
  for (int i = 0; i + 1 < N; ++i) {
    if (A[i] == A[i + 1])
      continue;
    else if (A[i] < A[i + 1]) {
      stock += cache / A[i];
      cache -= stock * A[i];
    } else {
      cache += stock * A[i];
      stock = 0;
    }
  }
  cache += stock * A[N - 1];
  cout << cache << endl;
}
