#include <bits/stdc++.h>
using namespace std;
using P = pair<long long int, long long int>;
int main() {
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int ans = 1000;
  for (int start = 0, end = 1; end < n && start < n; start++) {
    end = start + 1;
    while (end < n && a[end - 1] <= a[end]) end++;
    long long int kabu = ans / a[start];
    long long int zankin = ans % a[start];
    long long int coans = kabu * a[end - 1] + zankin;
    if (ans < coans) ans = coans;
  }
  cout << ans << endl;
  return 0;
}
