#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  if (n == 1)
    cout << 1000;
  else {
    int amount = 1000, stocks = 0;
    for (int i = 0; i < n - 1; ++i) {
      if (a[i] < a[i + 1]) {
        stocks = amount / a[i];
        amount = amount % a[i] + stocks * a[i + 1];
        i++;
      }
    }
    cout << amount;
  }
  return 0;
}
