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