#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> b(n - 1);
  for (int i = 0; i < b.size(); i++) {
    b[i] = a[i + 1] - a[i];
  }
  long long stock = 0;
  long long money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (b[i] < 0) {
      money += a[i] * stock;
      stock = 0;
    } else if (b[i] > 0) {
      int plus = money / a[i];
      stock += plus;
      money -= plus * a[i];
    }
    if (i == n - 2) {
      money += stock * a[i + 1];
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
