#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long mn = 1000;
  int st = 0;
  bool f = false;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      st += mn / a[i];
      mn -= st * a[i];
    } else {
      mn += a[i] * st;
      st = 0;
    }
  }
  mn += a[n - 1] * st;
  cout << mn << endl;
}
