#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1, 0);
  for (int i = 1; i <= n; i++) cin >> a[i];
  int idx = 1, yen = 1000;
  while (idx < n) {
    if (a[idx] > a[idx + 1]) {
      idx++;
      continue;
    }
    int s = 1;
    while (idx + s <= n && a[idx + s - 1] <= a[idx + s]) s++;
    yen = yen + (a[idx + s - 1] - a[idx]) * (yen / a[idx]);
    idx += s;
  }
  cout << yen << endl;
  return 0;
}
