#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  vi updown(n - 1);
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] > a[i + 1])
      updown[i] = -1;
    else if (a[i] < a[i + 1])
      updown[i] = 1;
    else
      updown[i] = updown[i - 1];
  }
  vector<string> torihiki(n);
  if (updown[0] == 1) torihiki[0] = "buy";
  for (int i = 0; i < (int)(n - 2); i++) {
    if (updown[i] == 1) {
      if (updown[i + 1] == -1) torihiki[i + 1] = "sell";
    }
    if (updown[i] == -1) {
      if (updown[i + 1] == 1) torihiki[i + 1] = "buy";
    }
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (torihiki[i] == "buy") {
      kabu = money / a[i];
      money -= kabu * a[i];
    }
    if (torihiki[i] == "sell") {
      money += kabu * a[i];
      kabu = 0;
    }
  }
  if (kabu != 0) {
    money += kabu * a[n - 1];
  }
  cout << money << endl;
}
