#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
using ulli = unsigned long long int;
using ld = long double;
int a[(int)(2e5 + 5)];
int main() {
  int n;
  cin >> n;
  lli cy = 1000, ans = 1000, cs = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  if (a[1] > a[0]) {
    cs = cy / a[0];
    cy %= a[0];
  }
  for (int i = 1; i < n - 1; ++i) {
    if (a[i] == a[i - 1] && a[i] == a[i + 1]) {
      continue;
    }
    if (a[i + 1] > a[i] && a[i - 1] >= a[i]) {
      cs = cy / a[i];
      cy %= a[i];
      continue;
    }
    if (a[i] >= a[i - 1] && a[i] > a[i + 1]) {
      cy += cs * a[i];
      cs = 0;
      ans = cy;
    }
  }
  ans = max(ans, cy + cs * a[n - 1]);
  cout << ans;
  return 0;
}
