#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int ii = 0; ii < N; ++ii) {
    cin >> A[ii];
  }
  A.push_back(0);
  int m = 1000;
  int s = 0;
  for (int ii = 0; ii < N; ++ii) {
    if (s > 0) {
      m += s * A[ii];
      s = 0;
    }
    if (A[ii] < A[ii + 1]) {
      s = m / A[ii];
      m -= s * A[ii];
    }
  }
  cout << m << "\n";
  return 0;
}
