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