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