#include <bits/stdc++.h>
using namespace std;
const int mx = 2e5;
int main(void) {
  long N;
  cin >> N;
  long A[N];
  for (long i = 0; i < N; i++) cin >> A[i];
  long mochi = 1000;
  long kabu = 0;
  for (long i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1]) {
      long ichiji = mochi - mochi % A[i];
      kabu = ichiji / A[i];
      mochi -= A[i] * kabu;
    } else if (A[i] == A[i + 1]) {
    } else {
      mochi += A[i] * kabu;
      kabu = 0;
    }
  }
  mochi += kabu * A[N - 1];
  cout << mochi;
  return 0;
}
