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