#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 mo = 1000;
  int flag = 0;
  int cnt = 0;
  for (int i = 0; i < N - 1; i++) {
    if (flag == 0 && A[i + 1] > A[i]) {
      cnt = mo / A[i];
      mo -= mo / A[i] * A[i];
      flag = 1;
    }
    if (flag == 1 && A[i + 1] < A[i]) {
      mo += cnt * A[i];
      cnt = 0;
      flag = 0;
    }
  }
  if (flag == 1) {
    mo += A[N - 1] * cnt;
  }
  cout << mo << endl;
}
