#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  ll cnt = 0;
  ll cnta = 0;
  ll saihu = 1000;
  ll maxsaihu = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      saihu = saihu + cnt * a[i];
      cnt = 0;
    } else {
      cnta = cnt + saihu / a[i];
      saihu = saihu - a[i] * (cnta - cnt);
      cnt = cnta;
    }
    maxsaihu = max(maxsaihu, saihu);
  }
  if (a[n - 1] > a[n - 2]) {
    saihu = saihu + cnt * a[n - 1];
    cout << saihu << endl;
  } else
    cout << maxsaihu << endl;
  return 0;
}
