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