#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int MOD = 1000000009;
const long long INF = 1LL << 60;
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  ll dp[90]{};
  dp[1] = 1000;
  for (int i = 2; i <= N; ++i) {
    dp[i] = dp[i - 1];
    for (int j = i - 1; j <= i - 1; ++j) {
      ll v = dp[j] / A[j];
      ll w = dp[j] / (A[i] - A[j]) * v;
      dp[i] = max(dp[i], w);
    }
  }
  cout << dp[N] << endl;
  return 0;
}
