#include <bits/stdc++.h>
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  for (auto& e : A) std::cin >> e;
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < N; ++i) {
    if (i != N - 1 && A[i] < A[i + 1]) {
      stock = money / A[i];
      money %= A[i];
    }
    if (i == N - 1 || A[i] > A[i + 1]) {
      money += stock * A[i];
      stock = 0;
    }
  }
  std::cout << money << std::endl;
}
