#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int money = 1000;
  int stocks = 0;
  for (int i = 0; i < n - 1; i++) {
    if (i == 0) {
      if (arr[i + 1] > arr[i]) {
        stocks += money / arr[i];
        money -= ((money / arr[i]) * arr[i]);
        money += (stocks * arr[i + 1]);
        stocks = 0;
        i++;
      }
    } else if (i == n - 2) {
      if (arr[i + 1] > arr[i]) {
        stocks += money / arr[i];
        money -= ((money / arr[i]) * arr[i]);
        money += (stocks * arr[i + 1]);
        stocks = 0;
      }
    } else {
      if (arr[i] > arr[i - 1]) {
        money += stocks * arr[i];
        stocks = 0;
      }
      if (arr[i] < arr[i + 1]) {
        stocks = money / arr[i];
        money -= ((money / arr[i]) * arr[i]);
      }
    }
  }
  if (money >= 1000)
    cout << money << endl;
  else
    cout << 1000 << endl;
}
