#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  cout << u << endl;
  return u;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long cash = 1000;
  long long stock = 0;
  vector<long long> dp(n, 0);
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      cash += stock * a[i];
      stock = 0;
    } else if (a[i] < a[i + 1]) {
      long long stock_f = (int)(cash / a[i]);
      stock += stock_f;
      cash -= stock_f * a[i];
    } else {
      continue;
    }
  }
  if (stock > 0) {
    cash += a[n - 1] * stock;
  }
  cout << cash << endl;
}
