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