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