#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  int m = 1000, k = 0;
  int i = 0;
  while (i < N) {
    while (i < N && A[i] >= A[i + 1]) {
      ++i;
    }
    if (i == N) {
      break;
    }
    k += m / A[i];
    m -= m / A[i] * A[i];
    while (i < N && A[i] <= A[i + 1]) {
      ++i;
    }
    if (i == N) {
      break;
    }
    m += A[i] * k;
    k = 0;
  }
  m += A[N - 1] * k;
  cout << m << endl;
  return 0;
}
