#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using Graph = vector<vector<long long>>;
long long fg(long long k) {
  long long sum = 1;
  for (long long i = 1; i <= k; ++i) {
    sum *= i;
  }
  return sum;
}
signed main() {
  long long a;
  cin >> a;
  vector<long long> vec(a);
  for (long long i = 0; i < a; i++) {
    cin >> vec[i];
  }
  vector<long long> vec1(a - 1);
  for (long long j = 0; j < a - 1; j++) {
    if (vec[j] < vec[j + 1]) {
      vec1[j] = 1;
    } else if (vec[j] > vec[j + 1]) {
      vec1[j] = 0;
    } else {
      vec1[j] = 2;
    }
  }
  long long m = 1000;
  long long n = 0;
  for (long long k = 0; k < a - 1; k++) {
    if (k == a - 2) {
      if (vec[k] < vec[k + 1]) {
        n = m / vec[k];
        m = m - n * vec[k];
      }
    } else if (vec1[k] == 1 && vec1[k + 1] == 0) {
      n = m / vec[k];
      m = m - n * vec[k];
    } else if (vec1[k] == 0 && vec1[k + 1] == 1) {
      m = m + n * vec[k];
      n = 0;
    } else if (vec1[k] == 1 && vec1[k + 1] == 2) {
      n = m / vec[k];
      m = m - n * vec[k];
    } else if (vec1[k] == 2 && vec1[k + 1] == 0) {
      m = m + n * vec[k];
      n = 0;
    }
  }
  cout << m + n * vec[a - 1];
}
