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