#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 0; i < n; i++) cin >> a[i];
  a[n] = 0;
  int cash = 1000;
  int kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      kabu = cash / a[i];
      cash += (a[i + 1] - a[i]) * kabu;
    }
  }
  cout << cash << endl;
  return 0;
}
