#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long total = 1000;
  int stocks = 0;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  bool buy = false;
  for (int i = 0; i < n - 1; i++) {
    if (!buy) {
      if (v[i + 1] > v[i]) {
        buy = true;
        stocks += total / v[i];
        total -= stocks * v[i];
      }
    } else {
      if (v[i + 1] < v[i]) {
        buy = false;
        total += stocks * v[i];
        stocks = 0;
      }
    }
  }
  if (buy) {
    total += stocks * v[n - 1];
  }
  cout << total;
  return 0;
}
