#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int bal = 1000, shares = 0;
  vector<vector<int>> ext;
  int start = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      if (start != i) {
        ext.push_back({start, i});
      }
      start = i + 1;
    }
  }
  if (start != n - 1) {
    ext.push_back({start, n - 1});
  }
  for (auto i = 0; i < ext.size(); i++) {
    int si = ext[i][0], ei = ext[i][1];
    shares = bal / a[si];
    bal = bal % a[si];
    bal += shares * a[ei];
    shares = 0;
  }
  cout << bal << '\n';
  return 0;
}
