#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long N, H = 1000, D = 0, ite = 0, kabu = 0;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> A[i];
  }
  while (D < N - 1) {
    ite = 1;
    if (A[D] < A[D + ite]) {
      kabu = H / A[D];
      H = H - kabu * A[D];
      while (ite != 0) {
        if (D + ite == N - 1) {
          H = H + kabu * A[D + ite];
          break;
        }
        if (A[D + ite] > A[D + ite + 1]) {
          H = H + kabu * A[D + ite];
          D = D + ite;
          ite = 0;
        } else {
          ite++;
        }
      }
    }
    D++;
  }
  cout << H << endl;
  ;
  return 0;
}
