#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main(int, const char**) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a[i];
  }
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < (int)(n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      auto buy = money / a[i];
      stock += buy;
      money -= buy * a[i];
    } else if (a[i] > a[i + 1]) {
      money += stock * a[i];
      stock = 0;
    }
  }
  money += stock * a[n - 1];
  cout << money << endl;
  return 0;
}
