#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long int init = arr[0];
  vector<pair<long long int, long long int> > p;
  long long int current = -1;
  for (long long int i = 1; i < n; i++) {
    if (arr[i] >= arr[i - 1]) {
      current = arr[i];
    } else {
      p.push_back({init, current});
      init = arr[i];
    }
  }
  if (current > init) {
    p.push_back({init, current});
  }
  long long int cash = 1000;
  for (long long int i = 0; i < p.size(); i++) {
    long long int thistime = cash / (p[i].first);
    long long int remain = cash % p[i].first;
    thistime *= (p[i].second);
    if (thistime + remain > cash) {
      cash = thistime + remain;
    }
  }
  cout << cash;
}
