#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (int)(0); i < (int)(N); i++) cin >> A[i];
  int stock = 0;
  int cash = 1000;
  int bottom = A[0];
  for (int i = (int)(0); i < (int)(N - 1); i++) {
    if (A[i] > A[i + 1]) {
      cash += A[i] * stock;
      stock = 0;
    } else {
      stock += cash / A[i];
      cash -= A[i] * (int)(cash / A[i]);
    }
  }
  cash += A[N - 1] * stock;
  cout << cash << endl;
}
