#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, cash = 1000, stocks = 0;
  cin >> n;
  vector<int> V;
  for (int i = 0; i < n; i++) {
    cin >> a;
    V.push_back(a);
  }
  V.push_back(1);
  for (int i = 0; i < n; i++) {
    if (V[i + 1] >= V[i]) {
      int x = cash / V[i];
      stocks += x;
      cash -= x * V[i];
    } else {
      cash += stocks * V[i];
      stocks = 0;
    }
  }
  cout << cash << endl;
}
