#include <bits/stdc++.h>
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A = std::vector<int>(N);
  long long money = 1000;
  int kabu;
  int index;
  bool isBuy = 1;
  for (int i = 0; i < N; ++i) {
    std::cin >> A[i];
  }
  for (int i = 0; i < N; ++i) {
    if (isBuy) {
      if (i + 1 < N) {
        index = 1;
        while (i + index + 1 < N && A[i] == A[i + index]) {
          index++;
        }
        if (A[i] < A[i + index]) {
          kabu = money / A[i];
          money -= kabu * A[i];
          isBuy = 0;
        } else {
          continue;
        }
      }
    } else {
      if (i + 1 < N) {
        index = 1;
        while (i + index + 1 < N && A[i] == A[i + index]) {
          index++;
        }
        if (A[i] > A[i + index]) {
          money += kabu * A[i];
          kabu = 0;
          isBuy = 1;
        } else {
          continue;
        }
      } else {
        money += kabu * A[i];
        kabu = 0;
      }
    }
  }
  std::cout << money;
}
