#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t N;
  cin >> N;
  vector<int64_t> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  int64_t ans = 1000;
  int chk = 201;
  int ansp;
  for (int i = 0; i < N - 1; i++) {
    if ((A.at(i) < A.at(i + 1)) && !(i == N - 1)) {
      ansp = ans / A.at(i);
      ans = ans % A.at(i);
      chk = A.at(i);
    }
    if (chk < A.at(i)) {
      ans = ans + ansp * A.at(i);
      chk = 201;
    }
  }
  if (ans <= 200) ans = ans + ansp * A.at(N - 1);
  cout << ans << endl;
}
