#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int money = 1000;
  int i = 0;
  int stocks = 0;
  while (i < n - 1) {
    while (i < n - 1 && v[i + 1] <= v[i]) {
      i++;
    }
    if (i == n - 1) {
      break;
    }
    int bpSingle = v[i++];
    stocks = (money / bpSingle);
    money = (money % bpSingle);
    while (i < n && v[i] >= v[i - 1]) {
      i++;
    }
    int spSingle = v[i - 1];
    money += (stocks) * (spSingle);
  }
  cout << money << endl;
}
