#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 88;
int n;
int a[N];
void solv() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  priority_queue<int> q;
  int ans = 1000;
  for (int i = 1; i < n; ++i) {
    if (a[i] < a[i + 1]) {
      int q = (ans / a[i]);
      ans -= q * a[i];
      ans += q * a[i + 1];
    }
  }
  while (!q.empty()) {
    ans += q.top();
    q.pop();
  }
  printf("%d\n", ans);
}
int main() {
  solv();
  return 0;
}
