#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main() {
  ll N;
  cin >> N;
  ll yen = 1000;
  vector<ll> A(N);
  for (int i = 0; i < ((int)(N)); i++) cin >> A.at(i);
  ll i = 0, j = 1;
  while (i < N && j < N) {
    if (A[i] < A[j]) {
      int n = yen / A[i];
      yen += (A[j] - A[i]) * n;
      i = j;
      j = i + 1;
      continue;
    }
    i++;
    j = i + 1;
  }
  cout << yen << endl;
}
