#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
using pii = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long sum = 1000;
  long long kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      kabu += sum / a[i];
      sum -= kabu * a[i];
    } else if (a[i] > a[i + 1]) {
      if (kabu != 0) {
        sum += a[i] * kabu;
        kabu = 0;
      }
    }
  }
  cout << sum + kabu * a[a.size() - 1] << endl;
}
