#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  int kabu = 0;
  int total = 1000;
  int prev = 0;
  for (int i = 0; i < (n); ++i) {
    if (kabu == 0) {
      kabu += total / a[i];
      prev = a[i];
      total -= (total / a[i]) * a[i];
    } else {
      if (prev < a[i]) {
        total += kabu * a[i];
        kabu = 0;
        prev = 0;
      } else {
        total += kabu * prev;
        kabu = 0;
        kabu += total / a[i];
        prev = a[i];
        total -= (total / a[i]) * a[i];
      }
    }
  }
  cout << total + kabu * prev << endl;
}
