#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, j, ans, money = 1000, kabu = 0;
  cin >> n;
  vector<int> a(n);
  for (i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  for (i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1)) {
      kabu += money / a.at(i);
      money %= a.at(i);
    }
    if (a.at(i) > a.at(i + 1)) {
      money += kabu * a.at(i);
      kabu = 0;
    }
  }
  money += kabu * a.at(n - 1);
  cout << money << endl;
}
