#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];
  }
  long long CurrentMoney = 1000;
  for (int i = 0; i < N - 1; i++) {
    int stock = 0;
    if (A[i] < A[i + 1]) {
      stock = CurrentMoney / A[i];
      CurrentMoney += (A[i + 1] - A[i]) * stock;
    }
  }
  cout << CurrentMoney << endl;
  return 0;
}
