#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int m = 1000, s = 0;
  int ans = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i]) {
      int st = m / a[i];
      s += st;
      m -= st * a[i];
    } else if (a[i + 1] < a[i]) {
      int mo = s * a[i];
      s = 0;
      m += mo;
      ans = max(ans, m);
    }
  }
  m += s * a[n - 1];
  ans = max(ans, m);
  cout << ans;
  return 0;
}
