#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 (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using pi = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 0; i < n; ++i) cin >> a[i];
  a[n] = 0;
  int kane = 1000;
  int kabu = 0;
  int bef = 300;
  for (int i = 0; i < n; ++i) {
    if (a[i] <= bef && a[i] < a[i + 1]) {
      kabu += kane / a[i];
      kane -= kane / a[i] * a[i];
    }
    if (bef <= a[i] && a[i + 1] < a[i]) {
      kane += kabu * a[i];
      kabu = 0;
    }
    bef = a[i];
  }
  cout << kane << "\n";
  return 0;
}
