#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using minPQ = priority_queue<T, vector<T>, greater<T>>;
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;
}
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int m = 1000;
  int st = 0;
  for (int i = (0); i < (n - 1); ++i) {
    if (a[i] == a[i + 1]) continue;
    if (a[i] < a[i + 1] && st == 0) {
      st += m / a[i];
      m -= st * a[i];
    } else if (a[i] > a[i + 1] && st > 0) {
      m += st * a[i];
      st = 0;
    }
  }
  if (st > 0) m += st * a[n - 1];
  cout << m << endl;
}
