#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> arr(n);
  for (long long i = 0; i < n; i++) cin >> arr[i];
  long long amount = 1000;
  long long prev = LLONG_MAX;
  long long stocks = 0;
  for (long long i = 0; i < n; i++) {
    if (arr[i] > prev) {
      amount += stocks * arr[i];
      stocks = 0;
    } else if (arr[i] < prev) {
      long long kitna = amount / arr[i];
      stocks += kitna;
      amount -= kitna * arr[i];
    }
    prev = arr[i];
  }
  amount = max(amount, (long long)1000);
  cout << amount << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  t = 1;
  while (t--) solve();
}
