#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto i = 0; i < n; i++) cin >> a[i];
  int m = 1000, s = 0;
  if (a[1] >= a[0]) s += m / a[0], m -= s * a[0];
  for (auto i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      m += s * a[i], s = 0;
      s += m / a[i + 1], m -= s * a[i + 1];
    }
  }
  cout << m + s * a[n - 1] << endl;
  return 0;
}
