#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int cash = 1000;
  int gap = 0;
  int i = 1;
  for (; i < n; i++) {
    if (a[i] > a[i - 1])
      gap += a[i] - a[i - 1];
    else {
      if (gap != 0) {
        int stocks = cash / (a[i - 1] - gap);
        cash += stocks * gap;
        gap = 0;
      }
    }
  }
  if (gap != 0) {
    int stocks = cash / (a[i - 1] - gap);
    cash += stocks * gap;
  }
  cout << cash << endl;
}
