#include <bits/stdc++.h>
const int maxn = 2e5 + 5;
const int mod = 1e9 + 7;
using namespace std;
long long a[maxn];
void solve() {
  long long n, cur = 0, fee = 1000;
  cin >> n;
  vector<long long> up, down, res;
  for (int i = (0); i < (n); i++) cin >> a[i];
  if (a[0] <= a[1]) down.push_back(0);
  for (int i = (1); i < (n - 1); i++) {
    if (a[i] > a[i - 1] && a[i] >= a[i + 1])
      up.push_back(i);
    else if (a[i] < a[i - 1] && a[i] <= a[i + 1])
      down.push_back(i);
  }
  if (a[n - 1] >= a[n - 2]) up.push_back(n - 1);
  long long p1 = 0, p2 = 0, l1 = up.size(), l2 = down.size();
  res.push_back(1000);
  for (int i = (0); i < (n); i++) {
    if (p1 < l1 && up[p1] == i) {
      fee += cur * a[i];
      cur = 0;
      p1++;
      continue;
    }
    if (p2 < l2 && down[p2] == i) {
      cur += fee / a[i];
      fee -= fee / a[i] * a[i];
      p2++;
      res.push_back(fee);
      continue;
    }
  }
  sort(res.begin(), res.end(), greater<long long>());
  cout << res[0] << '\n';
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
