#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int property = 1000;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  for (int i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1])
      property = property / A[i] * A[i + 1] + property % A[i];
  }
  cout << property << endl;
}
