#include <bits/stdc++.h>
using namespace std;
struct edge {
  int to;
  int cost;
};
using P = pair<long long, long long>;
long long gcd(long long x, long long y) {
  if (x < y) {
    swap(x, y);
  }
  while (y > 0) {
    long long r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<long long> b(n);
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      b[i] = 1;
    }
    if (a[i] > a[i + 1]) {
      b[i] = -1;
    }
    if (a[i] == a[i + 1]) {
      b[i] = 0;
    }
  }
  b[n - 1] = -1;
  long long moti = 1000;
  long long kabu = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] == 1) {
      kabu = moti / a[i];
      moti = moti % a[i];
    }
    if (b[i] == -1) {
      moti = moti + kabu * a[i];
      kabu = 0;
    }
    if (b[i] == 0) {
      continue;
    }
  }
  cout << moti << endl;
}
