#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<int> top;
  vector<int> bottom;
  bool rise = false;
  int temp = 1000;
  for (int i = 0; i < N - 1; i++) {
    if (rise) {
      if (A[i] > A[i + 1]) {
        top.push_back(A[i]);
        rise = false;
      }
    } else {
      if (A[i] <= A[i + 1]) {
        bottom.push_back(A[i]);
        rise = true;
      }
    }
  }
  if (rise && A[N - 1] > A[N - 2]) top.push_back(A[N - 1]);
  for (int i = 0; i < top.size(); i++) {
    int b = bottom[i];
    int t = top[i];
    temp = temp % b + (temp / b) * t;
  }
  cout << temp << endl;
}
