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