#include <bits/stdc++.h>
using namespace std;
void solve(long long N, std::deque<long long> A) {
  int m = 1000;
  int s = 0;
  A.push_back(0);
  for (int i = 0; i < N; i++) {
    if (A[i + 1] > A[i]) {
      s += m / A[i];
      m = m % A[i];
    } else if (A[i + 1] > A[i]) {
    } else {
      m += A[i] * s;
      s = 0;
    }
  }
  cout << m << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::deque<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
