#include <bits/stdc++.h>
using namespace std;
constexpr int INF = 2e9;
int main() {
  int n;
  cin >> n;
  vector<int> b(n);
  for (int i = 0; i < (n); i++) cin >> b[i];
  long long res = 1000;
  long long cur = 0;
  vector<int> a;
  int prev = 0;
  b.emplace_back(300);
  for (int i = 0; i <= n; i++) {
    if (b[i] != b[prev]) {
      a.emplace_back(b[prev]);
      prev = i;
    }
  }
  n = a.size();
  vector<int> r(n + 1, 0);
  for (int i = n - 1; i >= 0; i--) r[i] = max(r[i + 1], a[i]);
  long long ans = 1000;
  for (int i = 0; i < n; i++) {
    if (a[i] <= r[i + 1]) {
      if (res < a[i]) {
        res += cur * a[i];
        cur = 0;
      } else {
        cur += res / a[i];
        res = res % a[i];
      }
    } else {
      res += cur * a[i];
    }
    ans = max(res, ans);
  }
  cout << ans << endl;
  return 0;
}
