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