#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  ll m = 1000;
  for (int i = 0; i + 1 < n; ++i) {
    if (a[i] >= a[i + 1])
      continue;
    else {
      int d = a[i + 1] - a[i];
      int kabu = m / a[i];
      m += kabu * d;
    }
  }
  cout << m << endl;
  return 0;
}
