#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  a[N] = a[N - 1];
  uint64_t m = 1000;
  for (int i = 0; i < N - 1; i++) {
    uint64_t c = 0;
    if (a[i] < a[i + 1]) {
      c = m / a[i];
    }
    m = m + (a[i + 1] - a[i]) * c;
  }
  cout << m << endl;
  return 0;
}
