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