#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  long long N, m = 1000, k = 0, p = INF, q = 0;
  cin >> N;
  vector<long long> A(N), x(N), y(N);
  for (int i = 0; i < (N); ++i) cin >> A.at(i);
  y.at(N - 1) = A.at(N - 1);
  for (int i = 0; i < (N - 1); ++i)
    y.at(N - i - 2) = max(y.at(N - i - 1), A.at(N - i - 2));
  for (int i = 0; i < (N); ++i) {
    if (A.at(i) < p && A.at(i) < y.at(i)) {
      k = m / A.at(i);
      m -= k * A.at(i);
      p = A.at(i);
    } else if (p < A.at(i)) {
      m += k * A.at(i);
      k = 0;
      p = A.at(i);
    }
  }
  cout << m << endl;
}
