#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int* arr = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int stocks = 0;
  int total = 1000;
  int balance = 1000;
  int last_stock = 0;
  for (int i = 0; i < n; i++) {
    if (balance > arr[i] && arr[i] != last_stock) {
      stocks += balance / arr[i];
      balance -= stocks * arr[i];
    } else if (balance <= arr[i] && arr[i] > last_stock) {
      balance += stocks * arr[i];
      stocks = 0;
    }
    last_stock = arr[i];
  }
  cout << max(total, balance) << endl;
  return 0;
}
