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