#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  int amt = 1000;
  int m = 0;
  int stocks = 0;
  int mi = INT_MAX;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] <= mi)
      mi = a[i];
    else {
      stocks += amt / mi;
      amt = amt + a[i] * (stocks) - (amt / mi) * mi;
      mi = a[i];
      stocks = 0;
    }
  }
  cout << amt;
  return 0;
}
