#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int rindex(vector<int>, int);
int main() {
  int index, kabu;
  long long result{1000};
  long long n;
  cin >> n;
  vector<int> a(n + 5, -1);
  for (long long i = 0; i < long long(n); i++) {
    cin >> a[i];
  }
  index = 0;
  bool fl = true;
  while (fl) {
    int index2 = rindex(a, index);
    if (index2 - 1 > index) {
      kabu = result / a[index];
      result %= a[index];
      result += kabu * a[index2 - 1];
      kabu = 0;
    }
    index = index2;
    if (index >= n - 1) fl = false;
  }
  cout << result << endl;
  return 0;
}
int rindex(vector<int> a, int index) {
  while (a[index] <= a[index + 1]) {
    index++;
  }
  index++;
  return index;
}
