#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  a.erase(unique(a.begin(), a.end()), a.end());
  long long now = 1000;
  long long last = now;
  long long kabu = 0;
  for (int i = 0; i < a.size() - 1; i++) {
    if (a[i] > a[i + 1]) {
      now += a[i] * kabu;
      kabu = 0;
    } else {
      kabu = now / a[i];
      now -= kabu * a[i];
    }
  }
  now += kabu * a[a.size() - 1];
  cout << now << endl;
  return 0;
}
