#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int money = 1000;
  long long int kabu = 0;
  vector<long long int> rate(n);
  for (int i = 0; i < n; ++i) cin >> rate[i];
  vector<bool> small(n);
  vector<bool> large(n);
  int lastlarge = 0;
  if (rate[0] < rate[1]) small[0] = true;
  if (rate[0] < rate[1]) {
    large[1] = true;
    lastlarge = 1;
  }
  for (int i = 1; i < n - 1; ++i) {
    if (rate[i] > rate[i + 1]) {
      small[i] = false;
      small[i + 1] = true;
    }
    if (rate[i] < rate[i + 1]) {
      large[i] = false;
      large[i + 1] = true;
      lastlarge = i + 1;
    }
  }
  for (int i = 0; i < lastlarge + 1; ++i) {
    if (small[i]) {
      long long int buy = money / rate[i];
      kabu += buy;
      money -= buy * rate[i];
    }
    if (large[i]) {
      long long int sell = kabu;
      kabu = 0;
      money += sell * rate[i];
    }
  }
  cout << money << endl;
  return 0;
}
