#include <bits/stdc++.h>
static const long long MX = 100005;
static const long long MX_ll = 1e18;
const double PI = acos(-1);
using namespace std;
int changeDoubleToInt(string decimal) {
  decimal.erase(1, 1);
  int n_decimal = atoi(decimal.c_str());
  return n_decimal;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long finaldown = -1, finalup = -1;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  long long kabu = 0, money = 1000;
  for (int i = 0; i < (n); i++) {
    if (i == 0) {
      if (a[i] < a[i + 1]) {
        kabu = money / a[i];
        money -= kabu * a[i];
      }
    }
    if (i > 0) {
      if (a[i] > a[i - 1]) finalup = i;
      if (a[i] < a[i - 1]) finaldown = i;
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) {
        money += kabu * a[i];
        kabu = 0;
      } else if (a[i] < a[i - 1] && a[i] < a[i + 1]) {
        kabu = money / a[i];
        money -= kabu * a[i];
      } else if (a[i] == a[i - 1] && a[i] < a[i + 1] && finaldown > finalup) {
        kabu = money / a[i];
        money -= kabu * a[i];
      } else if (a[i] == a[i - 1] && a[i] > a[i + 1] && finaldown < finalup) {
        money += kabu * a[i];
        kabu = 0;
      }
    }
  }
  if (kabu > 0) {
    money += kabu * a[n - 1];
  }
  cout << money << endl;
  return 0;
}
