#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vin = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int inf = 1e9 + 7;
const ll INF = 1e18;
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
int main() {
  int n;
  cin >> n;
  vin a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int mny = 1000;
  int kabu = 0;
  for (int i = 0; i < (n - 1); ++i) {
    mny += kabu * a[i];
    kabu = 0;
    if (a[i] < a[i + 1]) {
      kabu += mny / a[i];
      mny -= a[i] * kabu;
    } else {
      continue;
    }
  }
  mny += kabu * a[n - 1];
  cout << mny << endl;
}
