#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = 0; i < v.size(); ++i) {
    os << v[i];
    if (i != v.size() - 1) os << ", ";
  }
  os << "]";
  return os;
}
template <typename T>
void print(T v) {
  cout << v << endl;
}
template <typename T>
void in(T& v) {
  cin >> v;
}
int main() {
  int n;
  cin >> n;
  vector<long long> A(n);
  for (int i = 0; i < n; i++) in(A[i]);
  long long m = 1000;
  long long s = 0;
  int prev = A[0];
  bool up = false;
  for (int i = 1; i < n; i++) {
    if (prev == A[i]) {
      continue;
    }
    if (up) {
      if (prev < A[i]) {
        prev = A[i];
        continue;
      }
      m += s * prev;
      s = 0;
      up = false;
      prev = A[i];
      continue;
    }
    if (prev < A[i]) {
      int num = m / prev;
      m -= num * prev;
      s += num;
      up = true;
      prev = A[i];
      continue;
    }
    int num = m / prev;
    m -= num * prev;
    s += num;
    prev = A[i];
  }
  m += s * A[n - 1];
  s = 0;
  print(m);
  return 0;
}
