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