#include <bits/stdc++.h>
using namespace std;
int solve(int n, vector<int>& A) {
  vector<int> dp(n);
  dp[0] = 1000;
  for (int i = 1; i < n; i++) {
    dp[i] = dp[i - 1];
    for (int j = 0; j < n; j++) {
      int stocks = dp[j] / A[j];
      int current_value = dp[j] + (A[i] - A[j]) * stocks;
      dp[i] = max(dp[i], current_value);
    }
  }
  return dp[n - 1];
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cout << solve(n, a) << endl;
  return 0;
}
