#include <bits/stdc++.h>
using namespace std;
int solve(int n, vector<int>& A) {
  int current_money = 1000;
  for (int i = 0; i < n - 1; i++) {
    int stocks = 0;
    if (A[i] < A[i + 1]) {
      stocks = current_money / A[i];
      current_money += (A[i + 1] - A[i]) * stocks;
    }
  }
  return current_money;
}
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;
}
