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