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