#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto& e : A) {
    cin >> e;
  }
  int cur = 1000;
  for (int i = 0; i < N - 1; i++) {
    int j = i + 1;
    while (j < N && A[j - 1] < A[j]) {
      j++;
    }
    j--;
    if (A[i] < A[j]) cur = (cur / A[i]) * A[j] + (cur % A[i]);
    i = j;
  }
  cout << cur << '\n';
  return 0;
}
