#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  int bal = 1000, stocks = 0;
  for (int i = 0; i < n; ++i) {
    if (i != n - 1 && a[i] < a[i + 1] && stocks == 0) {
      stocks = bal / a[i];
      bal = bal % a[i];
    }
    if (i != 0 && a[i] > a[i - 1] && stocks != 0) {
      bal = bal + stocks * a[i];
      stocks = 0;
    }
  }
  cout << bal << endl;
  return 0;
}
