#include <bits/stdc++.h>
int main() {
  int n;
  int a[80];
  bool b[79];
  bool is_upping = false;
  std::cin >> n;
  std::cin >> a[0];
  for (int i = 1; i < n; ++i) {
    std::cin >> a[i];
    if (is_upping)
      is_upping = !(b[i - 1] = a[i] < a[i - 1]);
    else
      is_upping = b[i - 1] = a[i] > a[i - 1];
  }
  int money = 1000;
  int kabu = 0;
  bool is_buy = true;
  for (int i = 0; i < n - 1; ++i) {
    if (b[i]) {
      if (is_buy) {
        kabu = money / a[i];
        money -= kabu * a[i];
        is_buy = false;
      } else {
        money += kabu * a[i];
        kabu = 0;
        is_buy = true;
      }
    }
  }
  if (kabu) money += kabu * a[n - 1];
  std::cout << money;
  return 0;
}
