#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int curr = 1000;
  for (int i = 0; i < n; i++) {
    int j = i + 1;
    while (j < n && a[j] >= a[j - 1]) j++;
    j--;
    int diff = a[j] - a[i];
    if (diff <= 0) {
      i = j;
      continue;
    }
    int nmax = curr / a[i];
    int remain = curr % a[i];
    int pro = (a[j]) * nmax;
    curr = remain + pro;
    i = j;
  }
  cout << max(curr, 1000) << endl;
}
