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