#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N + 1];
  for (int i = 1; i <= N; i++) {
    cin >> A[i];
  }
  long long int currentMoney = 1000, kabu = 0;
  for (int i = 1; i < N; i++) {
    if (A[i] < A[i + 1]) {
      kabu = currentMoney / A[i];
      currentMoney = currentMoney % A[i];
    } else if (A[i] > A[i + 1]) {
      currentMoney += kabu * A[i];
      kabu = 0;
    }
  }
  if (kabu != 0) {
    currentMoney += kabu * A[N];
  }
  cout << currentMoney << endl;
  return 0;
}
