#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; (i) < ((int)(N)); ++(i)) cin >> A[i];
  int cost = 1000;
  int stock = 0;
  vector<int> L;
  if (A[0] < A[1]) L.push_back(0);
  for (int i = 1; i < N - 1; i++) {
    if (A[i - 1] >= A[i] && A[i] < A[i + 1]) L.push_back(i);
    if (A[i - 1] <= A[i] && A[i] > A[i + 1]) L.push_back(i);
  }
  if (A[N - 2] < A[N - 1]) L.push_back(N - 1);
  for (int l : L) {
    if (stock == 0) {
      stock += cost / A[l];
      cost -= stock * A[l];
    } else {
      cost += stock * A[l];
      stock = 0;
    }
  }
  cout << cost << endl;
}
