#include <bits/stdc++.h>
using namespace std;
void solve(long long N, std::vector<long long> A) {
  long long ans = 1000;
  long long money = 1000;
  long long stock = 0;
  for (long long i = 0; i < (long long)A.size() - 1; i++) {
    if (i != 0 && (A[i - 1] < A[i]) == (A[i] < A[i + 1]) &&
        ((A[i - 1] > A[i]) == (A[i] > A[i + 1]))) {
      continue;
    }
    if (A[i] < A[i + 1]) {
      stock = money / A[i];
      money -= stock * A[i];
    }
    if (A[i] > A[i + 1]) {
      money += stock * A[i];
      stock = 0;
    }
    ans = max(ans, money);
  }
  money += stock * A[A.size() - 1];
  ans = max(ans, money);
  cout << ans << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
