#include <bits/stdc++.h>
void purchace(long long* money, long long* kabu, int value) {
  *kabu += (int)(*money / value);
  *money -= *kabu * value;
  return;
}
void sell(long long* money, long long* kabu, int value) {
  *money += *kabu * value;
  *kabu = 0;
  return;
}
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  for (int i = 0; i < N; i++) std::cin >> A[i];
  A.push_back(0);
  long long money = 1000;
  long long kabu = 0;
  for (int i = 0; i < N; i++) {
    sell(&money, &kabu, A[i]);
    if (A[i] > A[i + 1]) {
      continue;
    } else {
      purchace(&money, &kabu, A[i]);
    }
  }
  std::cout << money << std::endl;
  return 0;
}
