#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; ++i) cin >> A[i];
  int current = 1000;
  int stocks;
  for (int i = 1; i < n; ++i) {
    if (A[i - 1] < A[i]) {
      stocks = current / A[i - 1];
      current += (A[i] - A[i - 1]) * stocks;
    }
  }
  cout << current << "\n";
}
