#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (long long i = 0; i < (int)(n); i++) cin >> a[i];
  vector<ll> topIndex, underIndex;
  ll downF = 1, upF = 1;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i + 1] < a[i]) {
      downF = 1;
      if (upF) {
        topIndex.push_back(i);
        upF = 0;
      }
    } else if (a[i + 1] > a[i]) {
      upF = 1;
      if (downF) {
        underIndex.push_back(i);
        downF = 0;
      }
    }
  }
  if (a[n - 1] > a[n - 2]) {
    topIndex.push_back(n - 1);
  }
  ll en = 1000, stock = 0;
  ll t = 0, u = 0;
  for (long long i = 0; i < underIndex.size(); i++) {
    stock = en / a[underIndex[i]];
    en -= stock * a[underIndex[i]];
    en += stock * a[topIndex[i]];
    stock = 0;
  }
  cout << fixed << en << endl;
}
