#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int *a = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int balance = 1000;
  int stocks = 0;
  int i;
  for (i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i]) {
      if ((balance / a[i]) > 0) {
        int s = balance / a[i];
        stocks = stocks + s;
        balance = balance - (s * a[i]);
      }
    } else if (a[i + 1] == a[i]) {
      continue;
    } else {
      if (stocks > 0) {
        balance = balance + (stocks * a[i]);
        stocks = 0;
      }
    }
  }
  balance = balance + (stocks)*a[n - 1];
  stocks = 0;
  cout << balance << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
