#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> stp(n);
  for (auto &x : stp) cin >> x;
  int st = 0, i = 0;
  int amount = 1000;
  while (1) {
    if (i >= n) break;
    while (i + 1 < n && stp[i] < stp[i + 1]) {
      i++;
    }
    if (st != i) {
      int nostocks = amount / stp[st];
      amount %= stp[st];
      amount += nostocks * stp[i];
    }
    i++;
    st = i;
  }
  cout << amount;
  return 0;
}
