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