#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = (int)(0); i < (int)(N); ++i) cin >> A[i];
  int64_t yen = 1000, kabu_yen, kabu_n = kabu_yen = 0;
  for (int i = (int)(1); i < (int)(N + 1); ++i) {
    if (A[i - 1] < A[i]) {
      int m = yen / A[i - 1];
      int64_t cost = (int64_t)m * A[i - 1];
      yen -= cost;
      kabu_yen += cost;
      kabu_n += m;
    } else if (A[i - 1] > A[i]) {
      yen += kabu_n * A[i - 1];
      kabu_yen = kabu_n = 0;
    }
  }
  cout << yen << endl;
}
