#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int amin = 205;
  int id = 81;
  for (int i = 0; i < (n); ++i) {
    if (amin > a[i]) {
      id = i;
      amin = a[i];
    }
  }
  if (id == n - 1) {
    cout << 1000 << endl;
    return 0;
  }
  int money = 1000;
  int kabu = 0;
  int buy_kabu;
  int sell_kabu;
  for (int i = id; i < n; i++) {
    if (kabu == 0 && i == id) {
      kabu = money / a[i];
      money = money - a[i] * kabu;
      buy_kabu = a[i];
      continue;
    }
    if (kabu != 0 && a[i] > buy_kabu) {
      money += kabu * a[i];
      kabu = 0;
      sell_kabu = a[i];
      continue;
    }
    if (kabu == 0 && sell_kabu > a[i]) {
      kabu = money / a[i];
      money = money - a[i] * kabu;
      buy_kabu = a[i];
      continue;
    }
  }
  cout << money << endl;
  return 0;
}
