#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 i = 0;
  int mon = 1000;
  while (i < n - 1) {
    while (i + 1 < n && a[i] >= a[i + 1]) {
      i++;
    }
    int st = mon / a[i];
    int res = mon - st * a[i];
    while (i + 1 < n && a[i + 1] >= a[i]) {
      i++;
    }
    mon = (res + st * a[i]);
  }
  cout << mon << endl;
}
