#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m = 1000;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  a.push_back(0);
  int l = 0;
  int r = 0;
  for (int i = 0; i < n + 1; i++) {
    if (a[i] < a[r]) {
      m = m % a[l] + m / a[l] * a[r];
      l = i;
      r = i;
    }
    if (a[i] > a[r]) {
      r = i;
    }
    if (a[i] < a[l]) {
      l = i;
    }
  }
  cout << m;
  return 0;
}
