#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const int mod = 5000000;
const int base = 1e7;
int a[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int nw = 0;
  int mg = 0;
  int cst = 1000;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (nw == 0) {
      nw = cst / a[i];
      mg = a[i];
      cst = cst % a[i];
    } else {
      if (a[i] > mg) {
        cst = nw * a[i] + cst;
        mg = 0;
        nw = 0;
      } else if (a[i] < mg) {
        cst = cst + mg * nw;
        mg = a[i];
        nw = cst / a[i];
        cst = cst % a[i];
      }
    }
  }
  if (nw) {
    cst = cst + nw * mg;
  }
  cout << cst;
}
