#include <bits/stdc++.h>
int main() {
  long N;
  std::cin >> N;
  std::vector<long> B;
  long A[80];
  for (long i = 0; i < N; i++) {
    long temp;
    std::cin >> temp;
    A[i] = temp;
    B.push_back(temp);
  }
  int min_ind = std::min_element(B.begin(), B.end()) - B.begin();
  long bottom = A[min_ind];
  long ceil = A[0];
  bool pay = 0;
  long kabu = 0;
  long money = 1000;
  for (long i = 0; i < N; i++) {
    if (i == min_ind && i != N - 1) {
      kabu = money / bottom;
      money = money % bottom;
      pay = 1;
    }
    if (i > min_ind) {
      if (pay == 0) {
        if (A[i] <= bottom) {
          bottom = A[i];
        } else {
          kabu = money / bottom;
          money = money % bottom;
          ceil = A[i];
          pay = 1;
        }
      } else {
        if (ceil <= A[i]) {
          ceil = A[i];
        } else {
          money += ceil * kabu;
          kabu = 0;
          pay = 0;
          bottom = A[i];
        }
      }
      if (i == N - 1 && pay == 1) {
        money += ceil * kabu;
        kabu = 0;
        pay = 0;
      }
    }
  }
  std::cout << money << std::endl;
  return 0;
}
