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